daniilidis-group/event_feature_tracking

several issues regarding data pre-processing

Closed this issue · 1 comments

Hi Alex,

Thanks for sharing the code!

I have found the following problem while I was trying to run the code with "Event Camera Dataset(boxes_6dof.bag)".

  1. topic name: extract_ros_data.m
    davis -> dvs
    My event cam(240C) as well.

  2. large file store: extract_ros_data.m
    '-v7.3' option is missing for a large file save
    save(output_name,'file_name','events',...
    'lin_acc','ang_vel','imu_time', 'cinfo','-v7.3' );
    It could be problem of 2016b and under.

  3. undistort problem: generate_undistort_map_radtan.m
    error message:

Error using ones
Requested 86400x86400 (55.6GB) array exceeds maximum array size preference. Creation of arrays greater than this limit may take a long time and cause MATLAB to become unresponsive. See array size limit or preference panel for
more information.

Error in lsqncommon (line 148)
            Jstr = sparse(ones(Jrows,Jcols));

Error in lsqcurvefit (line 257)
    lsqncommon(funfcn,xCurrent,lb,ub,options,defaultopt,caller,...

Error in lscftsh

Error in cameraParameters/undistortPointsImpl (line 221)
                lscftsh(@this.distortPoints, points, [], points, [], [], options);

Error in undistortPoints (line 91)
undistortedPointsDouble = undistortPointsImpl(cameraParams, pointsDouble);

Which matlab version is utilized for the code?
I am currently using 2016b. If you did not have the same problems above, it might be the version problem. I could not solve the last problem. Matlab's simple example code (undistortPoints) works well but not with the "boxes_6dof" (42k points). Still did not get why it needs that much of matrix.

Added -> I found another post related to this problem. Maybe I need to get the software update.
https://au.mathworks.com/matlabcentral/answers/297569-memory-issue-with-undistortpoints

Issues 1 and 2 should now be fixed in the code for any MATLAB version.

Issue 3 is a little trickier, since it looks like this memory issue now also happens for our version of MATLAB (2017b). The issue is that we were undistorting all of the points in the image at once. I've updated the generate_undistort_map_radtan function to undistort one point at a time, and it should work. However, it'll run pretty slow.

The fixes have been merged in #2