// put this script and the movie files in the same directory // Download the free application videoscript (www.videoscript.com) set x to 0; repeat 1 times // replace 1 by the number of files (=x) // First step : creation of a new movie file with just the differences between two successive images (= movements..) begin add 1 to x; if x = 1 then set m to file "honeybee1.mov";// replace the word honeybee1.mov by the name of your first file // if x = 2 then set m to file "honeybee2.mov";// copy and increment this line for all the files print (m as text); set data_movie2 to m; set duree to duration of data_movie2; print duree; set n to length of data_movie2; print n; set nn to duree / n; print nn; if x = 1 then set fichdif to "honeybee1dif.mov"; //if x = 2 then set fichdif to file "honeybee2dif.mov";//copy and increment this line for all the files print (fichdif as text); // Second step : creation of a text file with the coordinates (X-Y) of the antennae if x = 1 then set fichdens to "honeybee1coor.txt"; //if x = 2 then set fichdif to file "honeybee2coor.txt";//copy and increment this line for all the files print (fichdens as text); set new_movie to movie; set im to m[0]; set window "Current Frame" to reference im; set fichier1 to vector; set i to 1; repeat while (i < (length of m)) increment i begin set im to (m[i] - m[i-1]); append im to new_movie; end set file fichdif to new_movie; set data_movie to file fichdif; set start_image to data_movie[1]; set i to 1; set n to length of data_movie; print "Number of Frames: " + n; print "Antenne Droite"; repeat while (i < n) begin set f to data_movie[i]; set xx to width of f; set yy to height of f; set g to f[{0,0},{xx/2,yy}]; set diff1 to Math.Maximum(g); print diff1; append (diff1) to fichier1; set aa to 999;// 999 is just a separator in the text file (you can replace it by a return to next line) append(aa) to fichier1; add 1 to i; end set data_movie to file fichdif; set start_image to data_movie[1]; set i to 1; print "Antenne Gauche"; repeat while (i < n) begin set f to data_movie[i]; set xx to width of f; set yy to height of f; set g to f[{xx/2,0},{xx,yy}]; set diff2 to Math.Maximum(g); print diff2; append (diff2) to fichier1; append(aa) to fichier1; add 1 to i; end set file fichdens to (fichier1 as text); end