Skip to content

octopus7/kinect_v2_blender

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Kinect v2 Depth Preview (WPF, .NET Framework 4.8)

A Windows-only WPF app to preview Kinect v2 depth as a colorized spectrum and export it to PLY. It can save a single PLY, or continuously save binary PLY files (every second or every frame) together with half-size PNG snapshots.

  • Real Kinect v2 if SDK is installed; otherwise a simulated depth source is used.
  • Jet-like spectrum rendering with a vertical legend (labels in cm).
  • Depth mapping range: [sensor MinDepthMm, 2500 mm].
  • Blender-friendly orientation: +90° rotation around X on export.

Requirements

  • Windows 10/11
  • .NET Framework 4.8 Developer Pack
  • Kinect for Windows SDK 2.0 (for real sensor; optional)
  • Visual Studio 2019/2022 (recommended)

Build & Run

  • Open wpftest/wpftest.csproj in Visual Studio and build/run.
  • The project resolves Microsoft.Kinect from KINECTSDK20_DIR or C:\\Program Files\\Microsoft SDKs\\Kinect\\v2.0_1409\\Assemblies\\Microsoft.Kinect.dll.
  • If the Kinect sensor is unavailable, the app runs with a simulated 512x424 depth source.

UI Overview

  • Status overlay (top-left): source, resolution, FPS, last saved file name
  • Buttons (top-left):
    • Save PLY: Save the current frame as ASCII PLY.
    • Start PLY auto-save (1s): Toggle to save Binary PLY + half-size PNG every second.
    • Start per-frame PLY save: Toggle to save Binary PLY + half-size PNG every frame.
  • Legend (right): vertical spectrum bar with distance labels in centimeters.

Output Details

  • PLY (ASCII for single save, Binary Little Endian for continuous saves):
    • vertex properties: float x y z, uchar red green blue
    • units: meters
    • orientation for Blender: rotate +90° around X (Xb=X, Yb=-Z, Zb=Y)
    • intrinsics (approx): fx=fy≈365, principal point at image center
  • PNG (saved alongside Binary PLY):
    • same base filename, half resolution (width/2, height/2)
    • colorized BGRA32 frame encoded as PNG
  • Save location for continuous modes:
    • ./captures/<timestamp(yyyyMMdd_HHmmss)>/0000.ply, 0000.png, 0001.ply, ...
    • each new start uses a new timestamp folder and restarts numbering at 0000

Notes & Limitations

  • Intrinsics are approximate; for precise measurements, replace with calibrated values.
  • Depth mapping clamps to 2500 mm max by design.
  • Continuous saving can be I/O intensive; consider SSD storage.

Folder Structure

  • wpftest/ — WPF app source code
  • captures/ — created at runtime when saving continuously

For a Korean user guide, see README_KOR.md. For developer-oriented notes, see README_DEV.md.

About

A tool to visualize Kinect v2 depth data in Blender

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages