The threshold setting is just above the replacement frame rate, in Preferences > Capture > Recording.
I don't think it's related to the problem, it only changes a metadata entry in the output file. The file will contain the same frames.

Retroactive is a recording mode, it's on the same preference page as replacement frame rate. It will record the video to the memory buffer, and only at the end of the recording will generate the output file on disk. The other methods write to the disk on the fly which can be slower (but can be used continuously for longer). See more details here: https://www.kinovea.org/help/en/userint … #recording

Exposure time is in the individual camera configuration dialog (from the wrench button in the lower left of the capture screen). Make sure it's lower than 4 milliseconds if you target 250 fps. https://www.kinovea.org/help/en/capture … ebcam.html

> Why is replacement frame rate maxed at 100fps?

The point of this feature is to create a file with a traditional (low) framerate inside it, so it can still be played back normally (although at slower speed than real time). So starting with a high speed camera but saving files with normal speed frame rate and video in slow motion (typical operating mode of a high speed camera). To disable this feature you can set the "Threshold" field higher than your actual capture frame rate so it will never trigger. Maybe there should be an explicit check box to make things clearer.

The limited number of frames in the output video and the blur seems to be two other separate problems. Blur is caused by too high exposure time. What camera model are you using?
Try to use the recording mode "Retroactive" for best performance if you are capturing short clips that fit in the delay buffer.

48

(1 replies, posted in Bug reports)

Thanks, very interesting. Unfortunately I'm afraid there is not much I can do about this right now but it confirms that the component used in the file explorer is too old for modern Windows and needs to be replaced.

49

(13 replies, posted in General)

ahan wrote:

Can we add an operation method like keyframe and RV to click and drag in the center of the video to watch frame by frame. There is also the function of frame extraction playback. Thank you, it would be perfect if there were such an operational method.

Hold the ALT key and click and drag the video, it will move frame by frame (or mouse wheel back and forth).

I don't know what you mean by "frame extraction playback", please describe with more details. If you mean playback of image sequences, it is already supported (for the common image formats, not EXR).

By RV I expect you mean Autodesk RV or Open RV, I'm not familiar with this program.

The behavior was changed to make it more robust and more standard conformant.

I don't have Excel at hand here but when I try in online Excel in OneDrive, it fails by default and puts everything in a single column, but there is a "Paste options" button with a "Split Text to Columns" option where I can select the correct variant. (edit: I can also do this after the paste by selecting the cells and doing Data > Split Text to Columns).

Are you saying that the version without the quotes is splitting the columns by default correctly on your machine and the one with the quotes is not?

The quotes should really not change anything. They are necessary if the text can contain the decimal separator which is the case here since the headers are user-entered text.

When I paste in LibreOffice, if I keep the headers, it automatically shows the text import dialog. Then the values are imported as text or as numbers based on the decimal separator.

If I paste in Google Sheets it's the same as OneDrive Excel, fails by default but there is a button "paste formatting" with a "Split text to columns" option with the options.

"Time (ms)";"Trajectory 1"
"133";"142.0046"
"167";"150.0579"

"Time (ms)";"Trajectory 1"
"133";"142,0046"
"167";"150,0579"

Time (ms);Trajectory 1
133;142.0046
167;150.0579

Time (ms);Trajectory 1
133;142,0046
167;150,0579

The double quotes don't make the content string, it's a standard way of writing the data in case the cell separator is the same as the decimal separator.

What is the problem you are facing exactly? Is there a spreadsheet software that won't take this and create numbers? Does it not go through a text import dialog?

I'm surprised by the fact that the first value seemingly uses a coma and the others a point as decimal separator. You can force the separator in preferences under Drawings > Export.

52

(4 replies, posted in General)

There are no PM here. And it would be great to have these sorts of discussions in the open so other people can read them and learn through them.

53

(4 replies, posted in Bug reports)

Very interesting. So maybe it's the file explorer thing that's blocking everything for certain people. This part of the code is based on some truly ancient Windows APIs.

Do you have network drives bound to drive letters? Or some other slightly atypical things that might trip it up?

54

(4 replies, posted in Bug reports)

There have been several similar reports over the years but unfortunately I've never been able to reproduce it, so I don't know what to investigate. I have tested on several Windows 11 machines including a fresh install and never got the problem.

I'm not sure if this would work but assuming there are landmarks on the rail tracks or pylons that are equally spaced, one way might be to use the counter tool and mark one beat each time the pylon gets out of view.

Right now the counter tool data doesn't get exported in the spreadsheet export… that's an oversight. You could do the same adding a full key frame at each landmark crossing event. Then in the spreadsheet you would need to multiply the frame index by the distance between the pylons and that should give you a distance/time series that you could do further calculations on.

Thanks, I reproduce the problem. I'm not sure what's going on.

57

(5 replies, posted in General)

I think the most pressing issue is that when tracking drawings we don't see what's happening and there is no way to configure the tracking parameters. This has been a problem for too long and it's time to address it.

This is my current tentative roadmap/priorities regarding tracking improvements (these may or may not make sense, more personal notes than anything)

Roadmap
1. Move tracking configuration to a new tab in the side panel.
2. Have a visual feedback of the tracking always visible in this panel.
3. Have an option to keep the trajectory alive and recover when tracking fails for a few frames (occlusions).
4. Make it possible to configure and visualize the parameters of each tracked point of drawings in this same panel.
5. Make it possible to display the individual trajectories of the tracked points of drawings.
6. Implement new tracking algorithms for round markers and for "quadrants" markers (2x2 checker board pattern).
7. Implement new style option to see the trajectories as a series of points.
8. Implement "onion skinning" for segments of tracked drawings, to see multiple positions at once.

Now a system to attach trackable points of a drawing to existing trajectories would come after this, depending on feedback. At that point the purpose of this would be to support the workflow of tracking individual points one after the other instead of all at once. But I feel the quest for this workflow is mainly a consequence of the current system not being robust nor user friendly enough.

I think points 4 and 5 will alleviate most of the pain of tracking drawings.


I also want to distinguish (at least in my mind) between the two contexts in which we do tracking.

1. Tracking for visual feedback (qualitative)
- typically without any well defined plane of motion or impossible to calibrate.
- typically markerless.
- may or may not have camera motion.
- trajectories might be very complex in 3D space.
- lots of occlusions and unclear positions, motion blur.

Use cases: pretty much everything filmed in the field, tv footage, golf/disc golf shot tracing, track and field, gymnastics, dance, etc.
Tools: pattern matching, ball tracking, human pose estimation, spline tool.

2. Tracking for measurement
- typically with a very well defined plane of motion perpendicular to the camera axis.
- joints positions identified by markers.
- static camera.
- 2D motion only.
- limited occlusions.

Use cases: gait analysis, posture analysis, biomechanics studies, bike fit.
Tools: round marker tracking, quadrants marker tracking, 6DoF tracking.

This is the documentation draft for the page "Measuring repetitions and cadence" of the manual.

The first post contains the documentation that will be synchronized with the manual and you can post comments to add feedback or discuss points that are unclear.

-----------------------
Introduction

To count the repetitions of a cyclic activity use the Counter tool.

https://www.kinovea.org/screencaps/doc-drafts/counter/counter-tool.jpg

This tool lets us annotate cyclic activities: running strides, weight lifting repetitions, rotations in acrobatic sports, swimming strokes, etc.

Counting

Having added a counter to the video mark one repetition by using the menu Action > Add beat, or the shortcut key F7.

https://www.kinovea.org/screencaps/doc-drafts/counter/counter-count2.jpg

A typical procedure to annotate a cyclic sport is to reduce the playback speed and use the shortcut key to mark the cycles on the fly while the video is playing.

Displayed metric

The following metrics are available via the Label menu.

https://www.kinovea.org/screencaps/doc-drafts/counter/counter-labels.png

- Count: the current count. This can be configured to start at zero or one in the Options.
- Reverse count: this can be interesting to recount steps before an event, for example steps before take off in jumps.
- Cadence (instantaneous): the instantaneous frequency of the current cycle. That is, the reciprocal of the duration of the cycle (when the playback cursor is between two beats).
- Cadence (average): the number of full cycles divided by the time between the first and last beat.
- Period (instantaneous): the duration of the current cycle.
- Period (average): the average duration of full cycles between the first and last beat.

Accuracy of metrics

Note that the accuracy of the the "Period (instantaneous)" and "Cadence (instantaneous)" metrics is greatly affected by the frame rate of the video. The random error is up to half a frame interval on each side of the cycle.

On the other hand, if only the average cadence over a long period is required, it is not necessary to be frame-perfect on the intermediate cycles since only the total number of cycles over the period will be used for the calculation.

Cadence units

Each sport tend to count things differently. Cycling will typically count one for a full pedal revolution and measure that in revolutions per minute, while sprinting will count one for each step and measure it in steps per second.

By default the cadence unit is the Hertz (number of cycles per second) which is the most generic unit possible for frequency.

To set the displayed unit to something more appropriate for your application go the main menu Options > Preferences >  Drawings > Units > Cadence.

https://www.kinovea.org/screencaps/doc-drafts/counter/counter-units2.png

The following units are available:
- Hertz (Hz) - default unit.
- Cycles per second
- Cycles per minute
- Steps per second
- Steps per minute
- Strokes per second
- Strokes per minute
- Revolutions per minute

Note that Kinovea doesn't know if you are marking full cycles or half cycles, so you need to add beats in accordance to what you want to measure.

Tip
If the video is in slow motion don't forget to calibrate the time axis. See Measuring time.

Display options

The following toggles are available

https://www.kinovea.org/screencaps/doc-drafts/counter/counter-options.png

- Show label: this will show the name of counter object as an extra label above the value.
- Locked: when this is enabled this counter object will not listen to the F7 shortcut key.
- Zero-based numbering: if this is enabled the first beat displays a value of zero, and displays one only at the end of the first full cycle. This does not affect calculations.
- Half: when this is enabled the counter object will halve its value compared to the number of cycles that were annotated.
- Double: when this is enabled the counter object will double its value compared to the number of cycles that were annotated.

Locking the counter is important if you want to count several processes on the same video using the live annotation approach. Run through the video once for a counter, lock it, then run through the video again for another counter, lock it, and continue this way, with always having only one counter listening to the shortcut.

Using half or double can be useful when the metric of interest is for example single strokes but it is easier to count full cycles on the video footage. For example in swimming, counting one when the same arm goes into the water.

This is the documentation draft for the page "Lens calibration" of the manual.

The first post contains the documentation that will be synchronized with the manual and you can post comments to add feedback or discuss points that are unclear.

-----------------------
Introduction

Lens calibration is the process of calculating the internal parameters of the camera used to film the video. These include the field of view and distortion of the lens.

Lens calibration is currently used in two aspects of Kinovea:
- For measurements and display, the distortion is taken into account and coordinates are rectified before they are passed to the spatial calibration.
- In the Calibration validation dialog, to calculate the camera distance and measure the error of points that are outside the plane of motion. See Calibration validation.

https://www.kinovea.org/help/en/_images/distorted-coordinatesystem.png
Barrel distortion exposed by a GoPro action camera and the default coordinate system after lens distortion calibration.

Lens calibration is compatible with both line calibration and plane calibration. The coordinate system, lines and grid objects are drawn distorted to follow the distortion. The images themselves are not rectified.

Lens calibration procedure overview

Here is an overview of the lens calibration procedure
- Film a calibration pattern with the camera to be calibrated
- Open the calibration video in Kinovea
- Open the dedicated lens calibration mode
- Run the automated lens calibration
- Save the resulting data to a file
- When analyzing videos filmed with the same cameras, load the saved lens calibration profile

Calibration pattern

You can find a pattern here: https://github.com/opencv/opencv/blob/m … g?raw=true

Note:
The linked pattern image states that it is a 9x6 pattern because it's only counting the internal corners instead of the actual squares in the grid. Inside Kinovea the configuration dialog assumes the number given is the number of squares, so this pattern is referenced as a 10x7 pattern. Always count the number of squares to make sure the algorithm knows what to expect.

Guidelines for filming the pattern
- Film the pattern for a few seconds from various angles
- The dedicated mode is only available when images are cached so don't make the video too long
- When filming make sure the entire pattern is visible at all time, about a quarter of the image size
- Don't move too fast to avoid motion blur
- You don't have to print the image, just display it on a flat screen or a tablet
- The physical size of the filmed pattern doesn't matter
- You can either move the camera or move the checkerboard pattern, it doesn't matter
- You can use a different checker board pattern as long as you adjust the parameters in the configuration

https://www.kinovea.org/screencaps/doc-drafts/lens-calibration/lens-calibration-video.jpg

Open the lens calibration mode

Load the video of the calibration pattern in Kinovea.

Open the lens calibration mode using the menu Video > Lens calibration. This mode is also available from the menu Tools > Lens calibration > Lens calibration mode.

https://www.kinovea.org/screencaps/doc-drafts/lens-calibration/lens-calibration-mode-menu.png

Note: this will only be available when the video is short enough to trigger the “cached” mode (or
enough cache memory is allocated).

Run lens calibration

Right click the background and select menu Action > Run lens calibration.

It will show a progress bar while it calculates the parameters. When the calculation is complete it will paint the corners it has found on the checker board and display the results in the top left corner.

In this mode the player only shows the few frames used to perform the computation. Navigate the video and inspect the result. The colored patterns shows the detected corners and the reprojected corners based on the calculated calibration. There should not be any large divergence between the two.

Here is an example of a bad result due to poor lighting and motion blur on several frames
https://www.kinovea.org/screencaps/doc-drafts/lens-calibration/lens-calibration-bad.jpg

Lens calibration configuration

The algorithm can be configured by right clicking in the background of the video and selecting the menu Configuration…

https://www.kinovea.org/screencaps/doc-drafts/lens-calibration/lens-calibration-configuration.png

- Max images: number of images used for the computation
- Pattern size: the number of columns and rows of the checker board pattern to detect in the images. This must match the images
- Max iterations: number of iterations used by the optimization loop.

Save the data

Once you are happy with the result save the calibration data to a file by using the Save calibration data… menu.

Give it a descriptive name and save it preferably under the CameraCalibration folder in the Application Data folder of Kinovea to make it directly available as a menu in the program.

https://www.kinovea.org/screencaps/doc-drafts/lens-calibration/lens-calibration-mode.jpg

Load an existing calibration

If you have saved the calibration file in the Application data under the CameraCalibration folder, it will appear in the Tools > Lens calibration menu. Pick the calibration corresponding to the camera used to film the current video to load the data.

https://www.kinovea.org/screencaps/doc-drafts/lens-calibration/lens-calibration-menu2.png

If you saved the lens calibration file elsewhere you may load it manually using the Import menu.

https://www.kinovea.org/help/en/_images/distorted-coordinatesystem-plane.png

! Note
Any change of camera model, lens, or configuration options involving image resolution or zoom requires a new calibration procedure.

60

(13 replies, posted in General)

OK, so instead of cluttering the original post and duplicating the work of writing documentation I've decided to make dedicated threads for each feature/topic based on the documentation pages and I'll point the OP to these topics. Hope these will be useful to get feedback about the documentation itself (typos, clarifications needed, etc.).