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

colored point cloud streaming #15

Closed
bmegli opened this issue Jun 4, 2020 · 9 comments
Closed

colored point cloud streaming #15

bmegli opened this issue Jun 4, 2020 · 9 comments
Labels
enhancement New feature or request

Comments

@bmegli
Copy link
Owner

bmegli commented Jun 4, 2020

Continuing #13
RNHVE part of HVS#8

Proof-of-concept already implemented in depth-color branch.

@bmegli bmegli added the enhancement New feature or request label Jun 4, 2020
@bmegli
Copy link
Owner Author

bmegli commented Jun 4, 2020

From Intel tuning-depth-cameras-for-best-performance

The optimal depth resolution is:

  • Intel RealSense D415: 1280x720
  • Intel RealSense D435: 848x480

From librealsense#7820

  • Intel Realsense D455: 848x480

@bmegli
Copy link
Owner Author

bmegli commented Jun 4, 2020

From Intel tuning-depth-cameras-for-best-performance\

The “LEFT IR” camera has the benefit of always 1. Being pixel-perfect aligned, calibrated, and overlapped with the depth map, 2. Perfectly time-synchronized, 3. Requires no additional computational overhead to align color-to-depth, and 4. Gives no additional occlusion artifacts, because it is exactly co-aligned. The main draw-back is that it will normally show the projector pattern if the projector is turned on

So we should expect worse result with RGB sensor aligned to depth (or depth aligned to RGB sensor) compared to texturing depth with IR.

@bmegli
Copy link
Owner Author

bmegli commented Jun 4, 2020

From #14 FOV, for D435

Aligning depth to color will:

  • decrease FOV (to color FOV)
  • degrade the quality of depth (due to alignment)

Aligning color to depth will:

  • lack information about color for the wider depth FOV
  • degrade the quality of color (due to alignment)

librealsensee align example may be used to see what happens during alignment (cropping).

@bmegli
Copy link
Owner Author

bmegli commented Jun 4, 2020

From librealsense#3042 YUYV is the native format of RGB sensor data.

Ideally we would want to use YUYV format for RGB sensor to avoid unnecessary conversions.

From libreasense alignment code we see that it is not possible to align to depth with YUYV color format.

From HVE#18 VAAPI supports both YUYV (yuyv422) and RGBA8/BGRA8 (but not RGB8/BGR8) as rgb0/bgr0

The best we can do is:

  • use YUYV when aligning to color
  • use other format (e.g. RGBA8/BGRA8) when aligning to depth

@bmegli
Copy link
Owner Author

bmegli commented Jun 4, 2020

In theory alignment should be performed for undistorted images.

From librealsense#1430 D400 doesn't use distortion models (all coefficients as 0).

We consider adding coefficient estimation to the RGB calibration to reduce the distortion (by about 1 pixel at extremes), but at the moment projection without coefficients is the most accurate you can do

As far as I know nothing has changed in this area (undistortion code present but coefficents always zeroed).

bmegli added a commit that referenced this issue Jun 5, 2020
- alignment direction CLI argument
- YUYV/RGBA for color/depth alignment direction
   - librealsense not supporting YUYV alignment to depth
   - but YUYV is native Realsense format (optimal)
   - so we use it when possible (aligning to color)
- determine result resolutions on alignment direction

Related to #15
@bmegli
Copy link
Owner Author

bmegli commented Jun 6, 2020

Functionally it is finished. Readme needs some update before merging.

bmegli added a commit that referenced this issue Jun 6, 2020
- add aligned depth + color info

Related to #15
@bmegli
Copy link
Owner Author

bmegli commented Jun 6, 2020

Ready for merge

bmegli added a commit that referenced this issue Jun 6, 2020
Stream aligned depth and RGB color encoded in HEVC Main10 and HEVC Main.

- implemented in separate example (realsense-nhve-depth-color)
- additional user control over
   - resolutions
   - alignment direction
- calculates and outputs FOV along intrinsics
- YUYV/RGBA for color/depth alignment direction
   - librealsense not supporting YUYV alignment to depth
   - but YUYV is native Realsense format (optimal)
   - so we use it when possible (aligning to color)
- update readme

Finishes (implementation) #15 
RNHVE part of bmegli/hardware-video-streaming#8
Related to #13
@bmegli
Copy link
Owner Author

bmegli commented Jun 6, 2020

Merged.

The last thing to do is to update how-it-works section on wiki.

@bmegli
Copy link
Owner Author

bmegli commented Jun 6, 2020

finished

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

1 participant