koide3 / direct_visual_lidar_calibration

A toolbox for target-less LiDAR-camera calibration [ROS1/ROS2]
https://koide3.github.io/direct_visual_lidar_calibration/
777 stars 123 forks source link

Question: Is it possible to mask out image regions? #122

Open themightyoarfish opened 1 month ago

themightyoarfish commented 1 month ago

I would like to run this software in a scenario where some fixed or less fixed object is showing up in the camera and LIDAR data, which should be ignored for calibration purposes, e.g. camera an LIDAR are mounted on large machinery which moves them around, or stuff is hanging into the image/lidar FOV.

Where would I add logic to filter out pixels or points so they do not participate in the optimization?

koide3 commented 1 month ago

I think such a mask can be implemented by modifying the NIDCost class that measures the normalized information distance between a point cloud and an image.

BTW, I suppose just filling masked regions with a uniform color (e.g., black or white) should work in most cases because the NID effectively ignores such outliers (at least in theory).

qsisi commented 2 days ago

I think such a mask can be implemented by modifying the NIDCost class that measures the normalized information distance between a point cloud and an image.

BTW, I suppose just filling masked regions with a uniform color (e.g., black or white) should work in most cases because the NID effectively ignores such outliers (at least in theory).

Why filling the masked image region with black(0) or white(255) color will lead to the NID ignores such region? In my understanding, the 0 or 255 pixel value also participate in the construction of the image histogram hist_image as well as the joint histogram hist?