- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm writing a custom system and would very much like to call the functions rs2_project_point_to_pixel() and rs2_deproject_pixel_to_point() in order to do things like creating my own point cloud (or at least, I plan to copy/paste and adapt these into my own apps).
To do this, I need to pass in a pointer to an rs2_intrinsics object.
All well and good ... Looking at https://github.com/IntelRealSense/librealsense/wiki/API-How-To%23get-video-stream-intrinsics https://github.com/IntelRealSense/librealsense/wiki/API-How-To# get-video-stream-intrinsics , it appears that I can use the quoted code in the "Get Field of View" section:
rs2::pipeline pipe;
rs2::pipeline_profile selection = pipe.start();
auto depth_stream = selection.get_stream(RS2_STREAM_DEPTH)
.as();
auto i = depth_stream.get_intrinsics();
Looking in the variable 'i' in the debugger, it appears to be ALMOST correct ... everything is filled in with what appear to be correct values EXCEPT for the distortion coefficients (rs2_intrinsics::coeffs) which are all 0 -- and that can't possibly be correct?
I will actually need those values to be filled in properly to call those functions I mentioned.
So -- how to fill in the distortion coefficients?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This is likely to be more helpful:
We're assuming that the image has already been rectified, so the distortion of the image you receive is 0. This hasn't been confirmed by Intel devs however.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm not sure if this will be helpful, but the link below shows the section of SDK 2.0 script code that generates the Modified Brown-Conrady distortion.
Similar code for Modified Brown-Conrady can be found in SDK 2.0's rsutil.h. file.
https://unanancyowen.github.io/librealsense2_apireference/rsutil_8h_source.html Intel® RealSense™ Cross Platform API: C:/librealsense-2.10.3/include/librealsense2/rsutil.h Source File
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This is likely to be more helpful:
We're assuming that the image has already been rectified, so the distortion of the image you receive is 0. This hasn't been confirmed by Intel devs however.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ah, thanks! Yes, would love to hear from the Intel devs from this.
I'll try it with 0's and see if that works. Would certainly let me simplify the code considerably if I knew in advance that they'd always be 0 ...
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page