NDEVR
API Documentation
PatchMatchCamera

GPU-accelerated PatchMatch depth estimation using Vulkan compute shaders. More...

Public Attributes

uint32_t _pad0
 Padding to match GLSL std430 array stride (128 bytes).
uint32_t _pad1
 (std430 rounds struct size to 16-byte alignment for arrays)
float C [3]
 Camera center (vec3).
int32_t camHeight
 Image height.
int32_t camWidth
 Image width (packs into vec3 C's trailing 4 bytes).
float K [12]
 3x3 intrinsic (column-major, 3 columns × [3 floats + 1 pad])
uint32_t pixelOffset
 Offset into packed image SSBO.
float R [12]
 3x3 rotation (column-major, 3 columns × [3 floats + 1 pad])

Detailed Description

GPU-accelerated PatchMatch depth estimation using Vulkan compute shaders.


Replaces the CUDA path in OpenMVS for vendor-neutral GPU acceleration.

Usage:

  1. Call IsAvailable() to check for Vulkan compute support
  2. Create instance with VulkanPatchMatch(device)
  3. Call estimateDepthMap() for each reference image
  4. Call writeDmap() to write OpenMVS-compatible .dmap files
  5. OpenMVS DenseReconstruction(0) finds existing .dmap files and skips to fusion. GPU-side camera struct (must match GLSL std430 layout exactly)

GLSL mat3 in std430 is stored as 3 column vectors, each vec3 padded to 16 bytes. Layout per mat3: [col0.x col0.y col0.z pad] [col1.x col1.y col1.z pad] [col2.x col2.y col2.z pad] Total: 3 columns × 4 floats = 12 floats = 48 bytes. Data is column-major (GLSL convention), so K[col*4+row] = K_matrix(row, col).

vec3 C at offset 96 occupies 12 bytes; the following int32 (4-byte aligned) packs into the 4-byte gap, so no explicit padding is needed between C and camWidth.

Definition at line 67 of file VulkanPatchMatch.h.


The documentation for this struct was generated from the following file: