how to calculate dynamic time warping (dtw) for each video file
hello.
i want to use video files for classification.
can i get an idea to compute dynamic time warping (dtw) for each video (avi file)?
i want to use videos as input of dynamic time warping (dtw).
after that, i will use dimensionality reduction and classify the matrix.
one idea can be videos have frames so, vectorize each frame and calculate dtw between two consecutive frames. this will help in gaining the difference in each frame and perhaps help in classification. hope this helps you.
v = (4/3)πr³ 

dv/dt = 4πr².dr/dt

so, when the diameter is 20 cm we have:

-4π = 4πr².dr/dt

hence, dr/dt = -1/r²

i.e. dr/dt = -1/10² => -1/100

now, d = 2r

so, d(d)/dt = 2.dr/dt

=> d(d)/dt = -1/50 cm/hour

or, -0.2 mm/hour

:)> Hi JimCreech,


It is possible to achieve a similar result in Dataiku by going through the following steps:


* run a [Window](https://knowledge.dataiku.com/latest/courses/visual-recipes/window.html) recipe using id as partitioning column, event as ordering column, and compute the lagdiff values on days
* run a [Prepare](https://knowledge.dataiku.com/latest/courses/basics/prepare-data/concept-prepare-recipe.html) recipe which will:
	+ run the assertions on the specific conditions you mentioned and create a dummy\_tmp column we'll reuse at the final step
	+ filter out the records where event == 01 (since we won't need it for the aggregation)
* run a [Groupby](https://knowledge.dataiku.com/latest/courses/basics/group-data/group-summary.html) recipe to aggregate at the id level and get the minimum of the dummy\_tmp column (which should be 1 if all conditions you described are verified, 0 otherwise).


You will find attached a sample DSS project with an example of implementation of those steps using the small example data mentioned in your post. If you are working on a regular basis with time series data, you may find this [tutorial](https://knowledge.dataiku.com/latest/courses/visual-recipes/window/window.html) on the Window recipe capabilities useful.


Hope this helps !


Best,


Harizo




[View solution in original post](/t5/General-Discussion/Using-Lag-and-Lead-in-Dataiku/m-p/19308#M1146) u (initial velocity) = 18 km/hr 
t ( time )= 2.5 sec
v( final velocity) = 0 m/s
from, the first equation of motionv = u +  a×t0 = 5 +  a×2.5a = - 2 m/s2 [@najoua.abbaci](/u/najoua.abbaci)

mabye the flow can be adopted to following:

assign:

leftside: drresult (datatype: datarow)

right side:

dt\_datepv.asenumerable.orderby(function ( r ) datetime.parseexact(r(0).tostring.trim, “dd.mm.yyyy”, system.globalization.cultureinfo.currentuiculture.datetimeformat)).last()

so… Hello,
  
Maybe this trick will help you : 

* [https://ccm.net/faq/137-how-to-cut-a-mp3](/faq/137-how-to-cut-a-mp3)
* <https://ccm.net/faq/12341-cut-your-video-or-audio-files-with-realplayer>


  
Best regards hi,

unfortunately, this information is not available.

but you can calculate the motion via matched bbox in adjacency frame directly.

thanks. class intervals
frequency
(fi)
xi
di = xi - a
fi di


0 - 20
17
10
-40
-680


20 - 40
28
30
-20
-560


40 - 60
32
50 = a
0
0


60 - 80
p
70
20
20p


80 - 100
19
90
40
760


total
Î£
fi = 96 + p


Î£ fi di = 20p -
480


![](https://s3mn%20mnimgs%20com/img/shared/discuss_editlive/5130830/2013_07_08_13_01_36/mathmlequation8813644107607516415%20png) Hi Valdeth. You should use input and output file streams if you want to write and read from a file. Basically you open the file for writing and once you are done close the file. Later you can open the file for reading. The example below reads numbers from the file and just prints them out. If you want to read the file line by line you should look at the getline() function. I have just used your initial array to come up with a result per array which gives the product of all negative numbers in the array. Note that there **HAS** to be at least 1 negative number per array.



```
const int m=4, n=5;
	int i,j;
	int num;
	int result;
	int A[m][n]={{5,3,-4,8,2},
				 {1,5,2,7,-8},
				 {-3,9,5,2,4},
				 {4,-1,3,6,8}};

	ofstream outfile;
	ifstream infile; 

	outfile.open("c:/matrix/matrix.txt");

	for (i=0;i<m;i++)
	{
		result = 1;

		for (j=0;j<n;j++)
		{
			outfile << setw(3)<< A[i][j];

                            // Multiply negative numbers in each array (has to be at least 1 negative number in each array)
			if (A[i][j] < 0)              				                      result *= A[i][j];  // result = result x A[i][j]
		}
		cout << "Result of array " << i << " is " << result << endl;
		outfile << "\n";
	}

	outfile.close(); // Close for writing

	infile.open("c:/matrix/matrix.txt"); // opens the file
    
	infile >> num;
	while ( !infile.eof() ) 
	{ // keep reading until end-of-file
		cout << "The next number is " << num << endl;
		infile >> num; // sets EOF flag if no value found
	}
	infile.close();  //Close for reading
``` know how to use each. in a binomial situation, cdf is simply the cumulative addition of pdfs - it gives the probability for a range of outcomes. hi [@cavediver](/u/cavediver), welcome to the forum :slight\_smile:

[image] cavediver:

could the ping sonar be used to deduce a forward velocity (perhaps with a doppler shift calculation)?

both the [ping sonar altimeter and echosounder](https://bluerobotics.com/store/sensors-sonars-cameras/sonar/ping-sonar-r2-rp/), or the [ping360 scanning imaging sonar](https://bluerobotics.com/store/sensors-sonars-cameras/sonar/ping360-sonar-r1-rp/) are designed and set up to work as …