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

StereoDepth: mesh rectification, disp/depth configurable resolution #148

Merged
merged 11 commits into from
Jun 12, 2021

Conversation

alex-luxonis
Copy link
Contributor

@alex-luxonis alex-luxonis commented Jun 7, 2021

  • StereoDepth mesh rectification support, mainly for fisheye camera usecase. The left and right meshes (files or byte arrays) need to be configured in the pipeline.
  • disparity/depth configurable output resolution, by rescaling the output. Available for now only when RGB-depth alignment is enabled (a warning is issued otherwise). For example, aligning ColorCamera preview and disparity/depth is possible as:
// Center cropping with no distortion
colorCamera->setPreviewKeepAspectRatio(true)  // Also default
colorCamera->setPreviewSize(300, 300)
stereoDepth->setOutputKeepAspectRatio(true)   // Also default
stereoDepth->setOutputSize(300, 300)

or

// No cropping on ColorCamera (the image will get squished). 
// Slight cropping may be applied to disparity/depth to get it aligned, as the RGB FOV is narrower
colorCamera->setPreviewKeepAspectRatio(false)
colorCamera->setPreviewSize(300, 300)
stereoDepth->setOutputKeepAspectRatio(false)
stereoDepth->setOutputSize(300, 300)
  • rgb_depth_aligned example: lower mono camera resolution for now: 720p -> 400p, to fix the lag, while keeping 30fps. The alignment will be further optimized in the future.

Related PR: luxonis/depthai-shared#36

Copy link
Collaborator

@SzabolcsGergely SzabolcsGergely left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style check is failing

@SzabolcsGergely
Copy link
Collaborator

Open PR for python bindings

@Luxonis-Brandon Luxonis-Brandon added 2021 Feature or fix that is planned for after our December feature/fix deliveries enhancement New feature or request Gen2 Feature for or issue with Gen2 labels Jun 7, 2021
@Luxonis-Brandon Luxonis-Brandon added this to In Progress in Gen2 Phase II Efforts Jun 7, 2021
@alex-luxonis
Copy link
Contributor Author

Updated PR description with snippets for using the new StereoDepth API: setOutputSize (renamed from setOutputResolution) and setKeepAspectRatio.

also included FW changes from #118 :
fixes for new boards with 0x2 boot mode (not switching back to bootloader after app reset)
@alex-luxonis alex-luxonis merged commit 5e24ca4 into develop Jun 12, 2021
@alex-luxonis alex-luxonis deleted the depth_align_improvements branch June 12, 2021 18:27
Gen2 Phase II Efforts automation moved this from In Progress to Done Jun 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2021 Feature or fix that is planned for after our December feature/fix deliveries enhancement New feature or request Gen2 Feature for or issue with Gen2
Development

Successfully merging this pull request may close these issues.

None yet

3 participants