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

Use intrinsics from CameraInfo message? #25

Open
gavanderhoorn opened this issue Mar 9, 2020 · 4 comments
Open

Use intrinsics from CameraInfo message? #25

gavanderhoorn opened this issue Mar 9, 2020 · 4 comments
Labels
enhancement New feature or request

Comments

@gavanderhoorn
Copy link
Member

gavanderhoorn commented Mar 9, 2020

The current implementation of yak_ros requires users to provide the relevant camera intrinsics via the camera_matrix ROS parameter.

I'm wondering whether it would be possible to instead retrieve a message from the camera_info topic from the same namespace as the depth image.

Afaict (but I'm not a "vision guy"), the K field of the message contains the required fx, fy, cx and cy. It also contains the resolution (width and height fields).

@gavanderhoorn gavanderhoorn added the enhancement New feature or request label Mar 9, 2020
@schornakj
Copy link
Contributor

Definitely possible and desirable. This would require some modifications to Yak to associate camera intrinsics with each image rather than loading them from a class-member parameter variable. Ideally this change would be designed to allow data from multiple cameras to be integrated into the volume simultaneously.

Another improvement would be using the distortion coefficients provided on the camera_info topic in the D field. Right now Yak assumes that all images are rectified and doesn't do distortion correction. This would require writing a CUDA implementation of a distortion correction function, which isn't especially complicated.

Since these features would require changes to Yak I'll make an enhancement issue in the Yak repo as well.

@gavanderhoorn
Copy link
Member Author

This would require some modifications to Yak to associate camera intrinsics with each image rather than loading them from a class-member parameter variable. Ideally this change would be designed to allow data from multiple cameras to be integrated into the volume simultaneously.

This would certainly be nice, but I was thinking of a first simple enhancement using ros::topic::waitForMessage(..) to retrieve a single CameraInfo and use it for the entire run.

@schornakj
Copy link
Contributor

I think that would be really straightforward. If there isn't a camera_info topic available would you fall back to intrinsics loaded as ROS parameters?

@gavanderhoorn
Copy link
Member Author

Yes, that would make sense to maintain current behaviour.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants