Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Questions regarding camera lidar preprocessing #89

Open
khuechuong opened this issue Jun 26, 2024 · 6 comments
Open

Questions regarding camera lidar preprocessing #89

khuechuong opened this issue Jun 26, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@khuechuong
Copy link

khuechuong commented Jun 26, 2024

Hi! So I have a few questions about the camera specifically before inputting in. Specifically in program details, example 2:

Does is the image topic need to be rect or image raw is fine?

This one doesn't use camera_info topic?

The reason I'm asking is because I use kalibr for intrinsic calibration. I believe their equivalent of plumb_bob is pinhole camera model (pinhole)1 (intrinsics vector: [fu fv pu pv]) and radial-tangential (radtan)* (distortion_coeffs: [k1 k2 r1 r2]). However it doesn't give me the rect matrix or the extrinsic so I can't compute the re-projection matrix or the rect matrix. Without the re-projection matrix, I am getting something like this https://user-images.githubusercontent.com/2222562/166346133-c1b3e678-e660-490c-addf-2740661ab6ca.png which I don't think is right to input.

What do you recommend? What did u guys use for intrinsic calibration?

@khuechuong khuechuong added the bug Something isn't working label Jun 26, 2024
@koide3
Copy link
Owner

koide3 commented Jul 3, 2024

The image doesn't need to be rectified, this package does it internally. The camera info data is saved in a json file, and programs after preprocessing use the saved camera info data.

You can use kalibr or any other camera calibration programs to calibrate your camera, then, you can give the calibrated parameters as command line parameters for the preprocessing program.

@khuechuong
Copy link
Author

Can I know which file of code that does it internally? I'm stuck with images like this:
image
when I rectify it. I want to know how you get the image the project right. Thanks!

@koide3
Copy link
Owner

koide3 commented Jul 4, 2024

Here is the camera models that computes projection and lens distortion: https://github.com/koide3/direct_visual_lidar_calibration/tree/main/include/camera

@khuechuong
Copy link
Author

which cpp file that did the distortion and rectify image?

@koide3
Copy link
Owner

koide3 commented Jul 12, 2024

It doesn't generate rectified images explicitly but does project and undistort 3D object points on the image space via the following function:

auto operator()(const T* const intrinsic, const T* const distortion, const Eigen::Matrix<T2, 3, 1>& point_3d) const -> Eigen::Matrix<decltype(T() * T2()), 2, 1> {

@khuechuong
Copy link
Author

so that function take into account the black stuff when it is undistort and trim it off?

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants