1

Hello everyone!
Is there any possibility to export x / y coordinates and timeline of a trajectory in to excel or csv?
If i save a Tracking to a kva file i already can find the coordinates, but it would be much easier to export these values in the tracking context menu.
Would need this feature for calculating in excel.
Thanx!

2

Hi,

The export feature is not yet in the application but I have done some work in this area recently.
I wrote an XSLT stylesheet that tells how to transform the .kva into a format that the spreadsheet application can read.

Note that this is still experimental. It will be more straightforward with next versions of the application.

You can get the XSLT stylesheet for MS-Excel here: kva2msxml-en.xsl.
Note: Firefox and Internet Explorer will try to display the file directly. You will have to do menu File > Save as... and save it somewhere. The final name of the file should be kva2msxml-en.xsl (Firefox adds an additional .xml extension, you should remove it).

Ok, what you need to do is reference this stylesheet from within your .kva file.
Here are the steps:

1. Change the extension of your .kva file to .xml
2. Copy the xslt file you downloaded (kva2msxml-en.xsl) to the same directory.
3. Open the .kva (now .xml) file in notepad and at second line (before <KinoveaVideoAnalysis>) add the following:
<?xml-stylesheet type="text/xsl" href="kva2msxml-en.xsl"?>

4. Open the file from MS-Excel. It will ask if you want to apply the stylesheet, choose this option and then OK.
Done. The trajectories coords should be ready for further copy/paste or computations.

That's it. It may sound complicated but it's not as much as it seems.

Please report any issue you may have in the process. (Also note that I have only tested it with MS-Excel 2003).

I also have an XHTML and an ODF stylesheets for the interested.

Thanks

3

Also, I forgot to mention, the time column from the export may or may not be meaningful depending on the source video.
It is currently expressed in the program's internal representation.
For DV sources for example, each frame adds one unit of time. (In this case you may be able to make something out of it.) But this will not always be true.

This will change when the feature is integrated in the program.

4

Thank you for spreadsheed export funktion! works great!
stephan

5

Hi Joan,

I'm interested in pulling the data from the .kva files into openoffice calc.  You mentioned that you had an odf stylesheet. I'd be interested in using it. I'm looking to get the coordinates of lines so that I can measure distances (e.g., runners stride lengths). I'm using the 0.86 beta.  I really appreciate all the work you've put into Kinovea.  It's an excellent piece of software and it keeps getting better.

Cheers;

John

joan wrote:

Hi,

The export feature is not yet in the application but I have done some work in this area recently.
I wrote an XSLT stylesheet that tells how to transform the .kva into a format that the spreadsheet application can read.

Note that this is still experimental. It will be more straightforward with next versions of the application.

You can get the XSLT stylesheet for MS-Excel here: kva2msxml-en.xsl.
Note: Firefox and Internet Explorer will try to display the file directly. You will have to do menu File > Save as... and save it somewhere. The final name of the file should be kva2msxml-en.xsl (Firefox adds an additional .xml extension, you should remove it).

Ok, what you need to do is reference this stylesheet from within your .kva file.
Here are the steps:

1. Change the extension of your .kva file to .xml
2. Copy the xslt file you downloaded (kva2msxml-en.xsl) to the same directory.
3. Open the .kva (now .xml) file in notepad and at second line (before <KinoveaVideoAnalysis>) add the following:
<?xml-stylesheet type="text/xsl" href="kva2msxml-en.xsl"?>

4. Open the file from MS-Excel. It will ask if you want to apply the stylesheet, choose this option and then OK.
Done. The trajectories coords should be ready for further copy/paste or computations.

That's it. It may sound complicated but it's not as much as it seems.

Please report any issue you may have in the process. (Also note that I have only tested it with MS-Excel 2003).

I also have an XHTML and an ODF stylesheets for the interested.

Thanks

6 (edited by joan 2010-07-04 11:12:25)

Hi,
The ODF export is now part of the software: File > Export to Spreadsheet.
(by the way, you may want to upgrade to 0.8.7 which was released a few hours ago big_smile)

However, the line length is not exported in these yet. Currently, it only exports key images titles, path tracking points coordinates, and chronometers time values.

So, currently to export a stride length automatically, it's a little bit complicated. You would have to create a path tracking (right click a point and do "Track point") and then move the video forward, adjust the tracking until you get to the end of the stride, where you'd finish the tracking.
Then you export that to spreadsheet, and you can get the coordinates of start and end points, and do the maths in the spreadsheet to get the length.

[Technical note]
If you know XSLT (or someone else reading this thread) you may modify the actual stylesheet to make it export the line length. The stylesheets are stored in the /xslt directory in the Program Files, you don't need to rebuild the program to change them. They take a .KVA XML stream as input, and transform it in the corresponding files depending on the option choosen in the menu (ODF, Excel, XHTML, text).

If anyone is interested in contributing in this area, I can provide more details.

-----------
EDIT :

Line length has now been integrated into the Spreadsheet export as of version 0.8.8.
A sample export to XHTML can be seen here.