WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 09-03-2019, 04:15 AM
josephredfern josephredfern is offline
Member
 
Join Date: Sep 2019
Posts: 8
Extracting high precision depth map from scene

Hello,

I'm new to using Vizard, and attempting to extract high-precision depth data from a scene.

At the moment, to do this, I am using:

Code:
depth = viz.addRenderTexture(format=viz.TEX_DEPTH_32)
float_buff = depth.saveToBuffer('<raw>', dataType=viz.GL_FLOAT)
	
size = depth.getSize()
w = size[0]
h = size[1]
	
d_float = np.fromstring(float_buff, np.float32, w*h)
	
np.save('depth.npy', d_float.reshape((w, h)))

This allows me to save the values of the depth render texture to a numpy array... but I have a few questions:
  • What units is this depth texture in? For the piazza scene, all/most values seem to be around 0.9. Is there a way of converting this to meters?
  • The dimension of the resulting texture is always 512x512. How is this controlled?
  • Is this the correct way to extract the depth? Is there a way of using depth.save() to store an uncompressed numpy array (rather than png/jpg etc?)

Any guidance would be appreciated.

Thanks,
Joe
Reply With Quote
 

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Copying Scene? Brett Lindberg Vizard 0 08-28-2009 11:56 PM


All times are GMT -7. The time now is 04:06 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC