Topic: 2 cameras acquisition using 120fps

Dear Joan,
thank you very much for creating KINOVEA. I’m aware of the tremendous work you and your team have done to create a program at this stage.

I’m using it now during some weeks and would like to share some experience, especially regarding the hardware I use with respect to the possible speed that can be reached.

I’ve build up a golf simulator at home, using KINOVEA and an adopted Inorkuo- Script.

The hardware has been selected to give enough speed for the desired processes.
All programs I use are 64bit (Windows, KINOVEA 8.27, VLC).

First, I tried 1 Kinovea using two acquisition windows. The frame rate was set to 120fps (delay mode, Kinovea display rate) and It worked, even with 120fps in both windows, but the processor peak load went up to 100% during video acquisition. The behavior that has been described by other users, that the recording speed is decreased by the system during acquisition, has not been observed. The system I use has the newest USB 3.1 Gen 2 controller and it seems to be that they give enough speed to acquire at the high frame rate of 120fps using 2 cameras. At acquisition, KINOVEA does not show any dropped frames and inspecting the video-file (MPEG) it is really recorded at 120fps.

As you mentioned to Waheeden, i switched using 2 Instances of KINOVEA in two separate directories (ZIP-Installation). Now, the load is evenly distributed to all 6 cores ab about 70-80% during acquisition.
However, the AutoIt-script is a little bit more complicated and the timing of the triggers (start-stop-recording) differs sometimes. It may be related to other processes inside windows. So far, I could not find the exact reason to that behavior.

The next step will be to use a monochrome BASLER camera that can acquire 330fps using the PYLON interface. However, the camera is still on the way.

Thanx again


Below, there are some thoughts and questions:

- Wheeden, Inorkuo and faultyclubs already pointed out, what the golfer community would like to have. I would like to emphasize this points.

- As you mention in another thread, a script language would be a very good extension to your program.
- Furthermore, to my impression it would be a very nice feature, to show a playback of the just acquired videos in separate windows that can be freely positioned on desktop or a second screen, adjusted by Rotation, Cropping and speed. To me it would be most interesting, to show a window as large as possible without any other features, due to the distance of the screen to the golfer of about 2m.

- using both cameras, the „smaller“ one (ELP) shows a much HIGHER „Bandwidth“-value in the title during acquisition. The value is about 10 times higher than the more demanding camera. I could not understand what the reason is. What does Bandwidth in this context really mean?
- On my PC starting KINOVEA 64bit needs about 10 seconds. Starting it on a Parallels machine on my MAC, it needs about 1 second. Is that due to the configuration of the cameras that are attached? At least, it is a very useful feature in the actual version, that the settings of the camera are restored. It reduces significantly the time to set up the system after restart.
- if using 2 acquisition windows in 1 KINOVEA, the arrow keys up/down (Delay-setting) exclusively have influence on the LEFT window. There is no chance to control the second RIGHT window using the keyboard.
- The capture history window is fine. However, I use a „file-delete older than minutes“ Function in the AutoIt-Script to reduce the amount of disk space (using a RAMDRIVE). Maybe, a synchronization of this window to the existing files on the disk would be helpful.
- In the 2 KINOVEA-setup, both KINOVEA-windows are used in resized position to fit the screen side-by-side. Is there any function available to fit the Video to the acquisition-window?
- The „buffer“ topic has already been mentioned by other users. It really would be helpful if the full speed of the camera can be used since using the buffer (delay-function)
- is there any possibility to create an overlay that is store simultaneously during acquisition? It would be helpful for a „quick check“ of the performed movement. I.e. „swaying“ during a golf-swing.
- is there any chance to set the shutter speed of the camera? I guess, using the PYLON interface it should be possible.
- would it be possible to rotate the video during ACQUISITION? I actual rotate the CAMERA 90° to better fit the golfer and use a rotate-command-line-option in VLC during playback.
- again the „delay feature“. It would be helpful, if the actual KINOVEA-window shows real-time but the acquisition will read the video from the buffer using the given delay.





Hardware Equipement
MSI Z390 GAMING EDGE AC
with USB 3.1 Gen 2
i5-9600K 6x3.7GHz
SSD
16GB RAM Corsair 3000MHz

First camera:
ELP 640x480 at 120fps, rolling shutter (I guess), UVC, Plug and Play, USB 2.0, MPEG
Second camera:
KAYETON (OV CMOS, exact type unknown), global shutter, 1280x720 at 120fps, UVC Plug and Play, USB 2.0, MPEG

Re: 2 cameras acquisition using 120fps

Thanks for the extensive feedback! To address some questions (the easy ones smile):

Reiner wrote:

What does Bandwidth in this context really mean?

Bandwidth here is the bandwidth between the camera and Kinovea. It depends on the image size, framerate and stream format. If the camera is configured to stream MJPEG directly, it will have much lower bandwidth. Maybe the ELP camera was configured to send uncompressed frames?

Reiner wrote:

- On my PC starting KINOVEA 64bit needs about 10 seconds. Starting it on a Parallels machine on my MAC, it needs about 1 second.

It should not take 10 seconds. Thanks for reporting this (people might not know what to expect so these types of issues are under-reported).

The first cold start takes about 3 seconds on my machine and the second start about 1.5s. The difference is the .NET framework being already loaded the second time around.

If you open the log, you will see each line starts with a number, it's the time in milliseconds since the start of the program. Can you send me the log or identify if there is a big jump in time and paste the surrounding lines? You have to scroll to find a start point. The first line says "xxx - DEBUG - [Main] - PreferencesManager - Importing preferences." and the first timestamp should be under 500ms.

Reiner wrote:

- In the 2 KINOVEA-setup, both KINOVEA-windows are used in resized position to fit the screen side-by-side. Is there any function available to fit the Video to the acquisition-window?

I am not sure if that's what you are looking for but if you double click the image it will try to fit to the display area.

Reiner wrote:

- is there any possibility to create an overlay that is store simultaneously during acquisition? It would be helpful for a „quick check“ of the performed movement. I.e. „swaying“ during a golf-swing.

I'm not sure to understand what you mean. Can you elaborate?

Reiner wrote:

- is there any chance to set the shutter speed of the camera? I guess, using the PYLON interface it should be possible.

Yes this depends on the camera. It should be shown as "exposure". It should be available on the ELP and the other one, as well as Basler and IDS cameras. Depending on the camera API the number will be in milliseconds (time the shutter stays open) or an arbitrary number.

Reiner wrote:

- would it be possible to rotate the video during ACQUISITION? I actual rotate the CAMERA 90° to better fit the golfer and use a rotate-command-line-option in VLC during playback.

I plan on looking into rotation of the camera stream shortly. I think 180° should be trivial because it doesn't change the aspect ratio. We'll see about the implications of the sideways rotations. (rotating the image is simple but then it breaks features that assume the image size is the same as the source…)

Re: 2 cameras acquisition using 120fps

Hi Joan,
thank you for your reply.

- Bandwidth: I use the ELP „as it is“. I don’t know a program that might influence the settings of the camera. It would be nice to have.
- Startup-time: I will be back home next week and will take a look on the log-file.
- Double click helps a lot to fit the acquisition window to the KINOVEA-window. That’s what I was looking for.
- I understand, that rotation may influence a lot of code in your program.
- Overlay: It’s pretty simple, I guess. During acquisition, I would like to „overlay“ a grid to the acquired video that will be saved to the video.?Afterwards, the 2 acquired videos will be played back using VLC, side by side covering the whole desktop for visual swing validation. If there are constant objects on the video (like a grid), it is much easier to control (unwanted) movements.

Re: 2 cameras acquisition using 120fps

You should be able to change the camera settings from within Kinovea, including exposure duration, framerate, resolution and stream format.

Regarding saving overlaid drawings, it is a regression. When you select the option to record what is displayed, it should paint the drawings on the frame before saving. I'll have to dig where the issue is coming from.