This article describes some of the changes in version 0.8.25 over version 0.8.24.
This release focuses on usability and polishing of existing features, and introduces one new feature in the Capture module.

1. General

Starting with version 0.8.25 a native x64 build is provided. There are now 4 download options. The `zip` files are the portable versions and will run self-contained in the extraction directory. The `exe` files are the installer versions.
The minimum requirements have not changed and Kinovea still runs under all Windows versions between Windows XP and Windows 10.

The interface is now translated to Arabic thanks to Dr. Mansour Attaallah from the Faculty of Physical Education, Alexandria University – Egypt.

2. File explorer

Thumbnails details

The details overlaid on the thumbnails have been extended and made configurable. The framerate and creation time have been added to the fields that can be displayed, the framerate is displayed by default. Right-click the empty space in the explorer to bring the thumbnails context menu and choose the fields you would like to be shown.

3. Playback module

Interactive navigation cursor

The video now updates immediately when moving the playback cursor. This behavior was previously only activated when the working zone was entirely loaded in memory. It is now enabled by default. The experience should be largely improved but if you are on a less powerful system and navigation is problematic, the behavior of the cursor can be reverted from Preferences > Playback > General > “Update image during time cursor movement”.

Video framerate

The internal framerate of the video can be customized from the bottom part of the dialog in Video > Configure video timing. This setting changes the “default” framerate of the video by overriding what is written in the file. This is a different concept than slow motion. What the setting does is redefine the nominal speed of the video, the 100%. This is useful when a video has a wrong framerate embedded in it which can happen sometimes. In general use you would not use this setting very often but it can save an odd file. Note that this setting is also not the same as the Capture framerate that can be set from the same configuration box.

4. Annotation tools

Named objects

All drawing tool instances (angles, arrows, markers, chronometers, etc.) now have a custom “Name” property. This makes it easier to match drawings with their value when exporting data to spreadsheet. Regarding spreadsheet export, all lines and point markers are now exported to the spreadsheet, whether or not they have the “Display measure” option active in Kinovea.

Custom length unit

A new custom length unit can be used to cover use-cases that are not natively supported by Kinovea. By default Kinovea natively supports Millimeters, Centimeters, Meters, Inches, Feet and Yards. The extra option can be used to define a new unit such as Micrometers or Kilometers depending on the scale of the video being analyzed, or any unit specific to your field. The default value for this option is “Percentage (%)”. The percentage unit would make sense when analyzing dimensions of objects purely relatively to one reference object. The mapping between video pixels and real life dimensions in the custom unit is defined by a calibration line, or a calibration grid for non-orthogonal planes. Any line or grid can be used as the calibration object.

The unit is defined in Preferences > Playback > Units > Custom length unit. It can then be used in any line or grid during calibration.

Default tracking parameters

A default tracking profile can be defined from Preferences > Drawings > Tracking. This profile will be applied by default to newly added tracks and trackable custom tools like the bikefit tool or the goniometer. The parameters can be expressed in percentage of the image size or in actual pixels. Note that in the case of tracks, the tracking profile can also be modified on a per-object basis after addition. This is not currently possible for other objects.

5. Capture module

File naming automation

The file naming engine has been rewritten from scratch to support a variety of automation scenarios that were not previously well supported. The complete path of captured files is configured from Preferences > Capture > Image naming and Preferences > Capture > video naming.

A complete path is constructed by the concatenation of three top-level values: a root directory, a sub directory and the file name. It is possible to define a different value for these three top-level variables for the left and right screens and for images and videos. The sub directory can stay empty if you do not need this level of customization. Defining root directories on different physical drives for the left and right screens can improve recording performances by parallelizing the writing.

The sub directory and the file name can contain “context variables” that are automatically replaced just in time when saving the file. These variables start with a % sign followed by a keyword. In addition to date and time components you can use the camera alias, the configured framerate and the received framerate in the file name.

The complete list of context variable and the corresponding keyword can be found by clicking the “%” button next to the text boxes.

If the file name component does not contain any variable, Kinovea will try to find a number in it and automatically increment it in preparation for the next video so as not to disrupt the flow during multi-attempts recording sessions.

Capture mosaic

The capture mosaic is a new feature introduced in Kinovea 0.8.25. It uses the buffer of images supporting the delay feature as a source of images and display several images from this buffer simultaneously on the screen. The result is a collection of video streams coming from the same camera but slightly shifted in time or running at different framerates. The capture mosaic can be configured by clicking the mosaic button in the capture screen:

Modes:

1. The single view mode corresponds to the usual capture mode: a single video stream is presented, shifted in time by the value of the delay slider.

2. The multiple views mode will split the video stream and present the action shifted in time a bit further for each stream. For example if the delay buffer can contain 100 images (this depends on the image size and the memory options) and the mosaic is configured to show 4 images, then it will show:

the real time image;

a second image from 33 frames ago;

another one from 66 frames ago;

and a fourth one from 100 frames ago.

Each quadrant will continue to update and show its own delayed stream. This can be helpful to get several opportunities to review a fast action.

3. The slow motion mode will split the video stream and present the action in slow motion. Each stream runs at the same speed factor. In order to provide continuous slow motion the streams have to periodically catch up with real time. Having several streams allows you to get continuous slow motion in real time.

4. The time freeze mode will split the video stream and show several still images taken from the buffer. The images are static and the entire collection will synchronize at once, providing a new frozen view of the motion.

The last experimental version of Kinovea introduced the ability to use the perpective grid as a coordinate system, which allows all kind of measurements on the grid. Here I’ll describe on what we have done with it in the context of podiatrics.

The experiment

For an experiment in podiatrics, we needed to measure how much people rotate when asked to perform 50 steps in the same spot, blindfolded. This is known as the Fukuda stepping test, it is generally used to detect neuropathologies but it has the interesting feature of being reproducible. I’ll not go into much details over the experiment itself or the rest of the setup as it is still unpublished and not my work. I’ll focus on the use of the perspective grid.

For this experiment, we developped a custom tool tailored for the Fukuda stepping test. The tool itself might be dissected in a future post, but the important thing here is that it is capable of measuring the angle of rotation of the person relatively to his initial direction (Σ on the tool).

Using the perspective grid’s ability to act as a coordinate system was very interesting here. Not only it lifted the need to mount the camera to the ceiling to get the view from above, but it actually allowed us to take series of images weeks apart without fearing measurement errors due to small changes in how the camera was fixed or how the experiment was set up. We could have taken the plastic track and set it up anywhere, even outdoors, and still have reproducible measures.

Once a person had performed the test (about 1 minute), we marked his feet position and took a picture. The picture was later processed in Kinovea to find the rotation angle.

Calibration

To be able to make measurements on the perspective grid, we first needed to calibrate it. To do this we measured the physical size of four segments on the plastic track that would be guaranteed to always be visible on any image we would take.
After laying down the grid and aligning its corners on these four points, we open the calibration dialog and enter the corresponding measures.

Note that the quadrilateral in the calibration dialog will have the same shape as the real one. This can be handy to give the segments the correct measure, especially when we take a picture from a completely different angle, rotate the camera, etc.

After the calibration is done, we can lay down the custom tool and make our measurement. (We generally do this on a different key image and disable the persistance for the grid so the grid doesn’t get in the way of the tool positionning).

Accuracy

During the course of the experiment we tested for the accuracy of the system.
To get the best results, we need to have the most precise calibration possible. It’s one of these cases where the number of megapixels does matter, and we used a still images camera rather than a camcorder to collect the measurement pictures.

To adjust the corners of the grid perfectly, we zoom to the max and adjust at pixel level.

To test the reproductibility, we started with the result of a single person and took several pictures from various angles around the room. We then processed the images independently from one another and compared the resultts. We also measured the angle manually, to act as the “ground truth”.

We got approximately ±1° margin of error, which was perfectly acceptable with regards to the experiment.

How the perspective grid works

3D geometry tells us that any quadrilateral on a plane can be seen as the projection of a rectangle from another plane. In other words, a rectangle can be mapped to an aribitrary quadrilateral and back, with a transform matrix. In Kinovea, the pixel coordinates of the grid on the screen represent the quadrilateral, while the physical position of the corners on the ground represent the rectangle.

This means that after the calibration is done, any coordinate on the screen plane can be converted to its coordinate in the ground plane. It’s as if Kinovea could see the ground from above.

To measure angles in perspective, we first convert the screen coordinates of the three points to physical world coordinates, and we make the measurement from there. After the conversion step all the measurements use regular 2D geometry. A similar approach is used to measure distances, speed, etc.

Future

Many things can be done when we can measure snakesthings on a plane. Statistical analysis of ball impacts in table tennis? Distribution of scoring angles in football? Tell us what you did with the perspective grid! And report what parts of the tool can be improved to further streamline the process.

(Note: this was originally posted in november 2012, I’m reposting it here to give it more visibility and to revive the blog).

This tutorial describes the process of designing and creating a custom tool for Kinovea (version 0.8.18 or later needed). It follows the actual creation of the “angle-to-vertical” tool shipped in 0.8.19. The process is currently manual and involves editing XML files.

Draw it on paper first

The first thing to do is to draw a draft of the tool on a piece of paper. Take notes of what type of interactions you want, angles to display, etc. Associate numbers to every point (movable by the user or not), starting from 0.

Here is my draft:
This tool is to check the angle of a segment relatively to the vertical axis.

Point 1 is the driving point and I want to measure the angle of segment [1,3] relatively to the vertical axis represented by [0,2].
Here is the final tool in a bike fit setup:
(Image courtesy of Synergy-ProTraining.de)

The spec of the tool is that when the knee point is moved, it drags the vertical line with it. This way the angle is always measured relatively to the vertical axis. (The numbers are for illustration, they are not part of the final tool).

Start with an existing file

Chances are that an existing tool resembles what you want to do, or has the right number of points. It’s always easier to start with an existing shell and fill in the blanks. The existing tools are found in the program directory, for example:
“C:\Program Files\Kinovea\DrawingTools”

Copy one of the existing XML file to a more convenient place and rename it. The name of the file is only relevant to the order of appearance in the menu, but it’s good practice to give it the same name as the tool name. To test the tool, save it back in Program files (you’ll be asked for admin rights for the copy) and restart Kinovea.

Angles

The Angles section defines between which segments we want to display angles.origin, leg1 and leg2 attributes refers to Point indices (starting at 0 as always).

Angles with the relative attribute are always less than 180° and switch sides when crossing the reference leg (segment from origin to leg1).

For non relative angles, the order of the “legs” are important since they indicate the angle orientation. An angle is defined as the angle going from leg1 to leg2clockwise. If you have a 90° angle and you mess up the orientation, it will show as 270°. Just invert the legs in the XML.

Angles with the tenth attribute to true will display tenth of degrees instead of integer values.

Point “1″ can go anywhere, but when it moves, the vertical segment [0,2] must moves with it, and stay vertical. Basically, we want point “0″ and point “2″ to always have the same “x” coordinate than point “1″. This is done with the HorizontalAlign impact.

Tracking

You may have noticed that I added the attribute trackable=”true” to the handle for point “1″ and point “3″

Trackability is new in version 0.8.19. The goal is that everything becomes trackable, including the angle tool, line tool, magnifier, custom tools, ect. I hope the combined power of custom tools and trackability will enable great things.

Be careful with which points you allow tracking on though. Generally a point with a constraint probably shouldn’t be trackable. It’s the tracking of other points that will move it, respecting the constraint along the way. A trackable but constrained point could cause problems when the tracking go outside the constraint. Experiment!

Next

As a custom tool designer, be sure to report your experiments and special needs! The custom tool framework is still new and will be further enriched as special needs arise. Length display, arrows, rectangles, new constraints or impacts, each time something is added to support a particular tool, the toolbox gets richer and opens even more possibilities for all future tools to come.

New features include: The Capture screen : directly stream live action from your camcorder into Kinovea; record images and videos; or delay the live stream for self coaching. Observational references : overlay complex drawings or images as motion guides on top of the video. Dual Export: save composite output from your comparison analysis.

With the introduction of live capture this version is an important milestone for the project, and another leap forward.
As always, early adopters feedback has been crucial to drive the developement: Thanks !