histogram change over time

13 views (last 30 days)
nirit
nirit on 4 Jan 2018
hello!
I have a collation of images. each image was taken in different time, meaning: img1(t=0), img2(t=T),img2(t=2T), ... I want to show the change in histogram over time. I want to plot 3d figure where: axis x and z will be histogram of each img and axis y will be the time count.
for example, for y=0, I will see the histogram of img1 on x & z axis for y=1, I will see the histogram of img2 on x & z axis and so on.
ideas?

Answers (1)

Pawel Jastrzebski
Pawel Jastrzebski on 9 Jan 2018
If you're looking for inspiration, check out the link below with plenty of examples and source code:
Or check out the code below as a starting point:
% Matrix 't' represents photos
% 1 row = 1 photo
t = randn(5,50)
binNo = 10 % number of bins for the histogram
bins = zeros(size(t,1),binNo) % preallocation
% 'FOR' loop to get the histogram values for each photo
for i=1:size(t,1)
h = histogram(t(i,:),...
binNo)
bins(i,:) = h.Values
end
% plot histogram bins as 3D bar-chart
b = bar3(bins)

Community Treasure Hunt

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

Start Hunting!