DavidGillsjo / VideoIMUCapture-Android

Android application for capture of Video, IMU data and Camera data useful in SLAM and Structure from Motion research. Differs between Optical Image Stabilization (OIS) and Digital Video Stabilization (DVS) and can provide OIS data if the device supports it.
GNU General Public License v3.0
242 stars 44 forks source link

Not getting 30 FPS Video Output #19

Closed sajjad-hm closed 1 year ago

sajjad-hm commented 1 year ago

First of all, Thanks for the awesome project.

In my device, I'm getting 15 FPS video output

358789926_251217711067328_3194630989666638_n

I'm getting this data2statistics.py script output

python data2statistics.py /host_home/2023_08_01_23_08_39/video_meta.pb3

But whenever I tried this script for the calibration

python data2kalibr.py /host_home/2023_08_01_23_08_39 --tag-size 0.088 --subsample 30

I also tried changing the --subsample to 15, as my device is recording at 15 FPS but it showing this error: (I'm sharing the whole terminal, just because if I made any error in between)

Using default tag: latest
latest: Pulling from davidgillsjo/videoimucapture-calibration
Digest: sha256:2c531c91c19d49df7145dcc8dc1887eb336dddea180ded87bfdd10fa6f520fcc
Status: Image is up to date for davidgillsjo/videoimucapture-calibration:latest
docker.io/davidgillsjo/videoimucapture-calibration:latest
groups: cannot find name for group ID 1000

sajjad@ab625d2976ad:/calibration$ python data2statistics.py /host_home/2023_08_01_23_08_39/video_meta.pb3

/usr/lib/python2.7/dist-packages/matplotlib/font_manager.py:273: UserWarning: Matplotlib is building the font cache using fc-list. This may take a moment.
  warnings.warn('Matplotlib is building the font cache using fc-list. This may take a moment.')
focus_calibration: APPROXIMATE
timestamp_source: REALTIME
resolution {
  width: 960
  height: 1280
}
pre_correction_active_array_size {
  width: 4032
  height: 3024
}
sensor_orientation: 90

gyro_info: "{Sensor name=\"BMI160 Gyroscope-Uncalibrated Non-wakeup\", vendor=\"BOSCH\", version=34744596, type=16, maxRange=17.452778, resolution=5.326165E-4, power=0.9, minDelay=5000}"
gyro_resolution: 0.000532616511919
accel_info: "{Sensor name=\"BMI160 Accelerometer-Uncalibrated Non-wakeup\", vendor=\"BOSCH\", version=34744596, type=35, maxRange=78.4532, resolution=0.0023928226, power=0.18, minDelay=2500}"
accel_resolution: 0.00239282264374
sample_frequency: 100.762886047

sajjad@ab625d2976ad:/calibration$ python data2kalibr.py /host_home/2023_08_01_23_08_39 --tag-size 0.088 --subsample 30

skipping frame 0, missing data
Traceback (most recent call last):
  File "data2kalibr.py", line 120, in <module>
    create_camera_yaml(proto, camera_yaml_path, args.matlab_calibration)
  File "data2kalibr.py", line 19, in create_camera_yaml
    q = Quaternion(c.lens_pose_rotation[3], *c.lens_pose_rotation[:3])
IndexError: list index (3) out of range

Can you guys please help me with what am I doing wrong?

sajjad-hm commented 1 year ago

I have figured out the problem. The bag file had been created on the /kalibr path but I missed adding the appropriate /target.yaml on the generated /kalibr path when running this

cd <path-to-recording>/kalibr
kalibr_calibrate_cameras --bag kalibr.bag --target target.yaml --models pinhole-equi --topics /cam0/image_raw

on the docker environment. Finally, I was able to generate the /kalibr/camchain-kalibr.yaml file.

The frame rate issue didn't make the problem. Thanks!

DavidGillsjo commented 1 year ago

I'm glad you figured it out, thanks for sharing your solution!