How to do Time Series Heatmap?

Hi everyone,
I have body movement time series data (sampling rate 25Hz, 1 hour long) from 9 positions on the human body (head, L/R arm, L/R hand, L/R knee, L/R foot). And I wanted to create a "heat map movie" in Matlab to show how much people move during the 1-hour session.
I was thinking about using imagesc to create the heatmap but wasn't sure about to really apply it, considering that I need to make a movie using immovie. I also wanted to know how exactly I can apply the heatmap to the figure below:
I would really appreciate it if anyone can help with providing ideas.
Thanks much.

9 件のコメント

jonas
jonas 2018 年 11 月 9 日
Could you upload some sample data?
Tian Lan
Tian Lan 2018 年 11 月 9 日
Hi there,
Please see attached mat file for time and data. Thanks.
KSSV
KSSV 2018 年 11 月 9 日
Both the data are of same size n*1. How a map can be plotted? I think you need to have location coordinates and the respective heat data wrt to time.
Tian Lan
Tian Lan 2018 年 11 月 9 日
I have the n*1 data from 9 positions. And I think I can assign coordinates of the 9 positions onto the figure above. Then I would have 9 separate heat map. Will that also be feasible?
jonas
jonas 2018 年 11 月 9 日
編集済み: jonas 2018 年 11 月 9 日
So this data is only a single position? I still don't know how to make a heatmap from a single column of data. As KSSV said, you need coordinates. Maybe things would be more clear if you explain what
"...show how much people move during the 1-hour session"
means
Image Analyst
Image Analyst 2018 年 11 月 9 日
Are the numbers the x location of the 9 different body parts? If so, have 9 images (one for each body part) and sum the image onto a master canvass at the proper x and y location for that body part.
Tian Lan
Tian Lan 2018 年 11 月 14 日
You guys are right. The data I attached is only for one position.
And I do assign each position a coordinate. And then I use fspecial() and imfilter() to generate density map, and then generate the heatmap using heatmap_overlay().
Using simulated data with a length of only 100, I managed to get a heatmap movie like the pic attached. However, for the real data, with a length of >80000 points, the iteration to generate density map and heatmap was super slow and used up the memory really quickly. My PC ran out of memory when i = 1000 ish, which is way less than 80000.
Any good idea on how to achieve this without exhausting the computer?
Thank you very much.
KSSV
KSSV 2018 年 11 月 14 日
We can help on this..on knowing the code. If code is shown, we can see how it is and make necessary modifications if any to make the code fast. For this, you need to provide the full code with all variables and data given. Explain your next step in detail.
Tian Lan
Tian Lan 2018 年 11 月 14 日
Hi KSSV,
I attached the main code heatmap_test.m and function heatmap_overlay.m as well as the body picture. I was testing only on one body position so I only enabled one set of coordinate. You can uncomment all other 8 eight sets to test if you'd like.
Please note that you can make a simulated dataset as testdata. It can be an 80000*1 double.
Thanks much for the help.

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

回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeData Distribution Plots についてさらに検索

質問済み:

2018 年 11 月 8 日

コメント済み:

2018 年 11 月 14 日

Community Treasure Hunt

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

Start Hunting!

Translated by