1
votes

So during work i need to analyise video's like this one http://youtu.be/TxBdkLcO5Do of a beating cells.

So i wrote a matlab code that plot a graph of changes in picture over time..

example of data of graph:

0 0
0.1 87124
0.15    87124
0.2 87124
0.25    85589
0.3 85589
0.35    85589
0.4 85589
0.45    19202
0.5 19202
0.55    19202
0.6 19202
0.65    61303
0.7 61303
0.75    61303
0.8 61303
0.85    56689
0.9 56689
0.95    56689
1   72988
1.05    72988
1.1 72988
1.15    72988
1.2 63871
1.25    63871

**

  • How my code works ?

** left row is time (in fraction of sec.) and 2nd row is amplitude of picture.

  1. I get loop all frames one by one.
  2. Turn frame into gray,calculate threshold,Turn into binary.
  3. Compare each frame with the frame just before it using imabsdiff
  4. store the result in array corresponding with its Frame number / frame rate

And i get my Graph .... (is this a good way or is there a better way to do it by the way ?)

  1. i plot array time,Amplitude_difference

So what i need to do now with this array is to find the number of Peaks that occurs and analyze the Frequency , Strength and regularity of these peaks !

Frequency = how many peaks in video

Strength = Peak summit value-average(2nd row)

regularity = time between each peak and next one !.

So basicly i should create an array peaks in which with every peak i add an element and assign to it value (Time assisted with peak, Strength )

and after this i want to print out a report of number of peaks and the value freq,str,reqularity of it..

:) HOW THE CAN I DO THAT :D !?

1

1 Answers

0
votes

Suppose you just need a peak finder. The rest should be simple.