Skip to content
Snippets Groups Projects
Commit 43a8f6af authored by Olivier Bertrand's avatar Olivier Bertrand
Browse files

Correct scene dimension mismatch and bug with emtpy folder

parent b2f2e21f
No related branches found
No related tags found
No related merge requests found
......@@ -143,7 +143,8 @@ so that they are not rendered
raise TypeError('filename must be a string')
database_folder = os.path.dirname(database_filename)
if not os.path.exists(database_folder):
os.makedirs(database_folder)
if database_folder: # Check empty string
os.makedirs(database_folder)
dataloger = DataBaseSave(database_filename,
channels=['R', 'G', 'B', 'D'],
arr_dtype=np.uint8)
......@@ -162,6 +163,7 @@ so that they are not rendered
# and the cmaxminrange has not already been assigned
# so the image need to be rendered
scene = self.renderer.scene(posorient)
scene = scene[..., 0]
distance = scene[..., -1]
distance[distance > self.world_dim] = self.world_dim
scene[..., -1] = distance
......
......@@ -322,5 +322,6 @@ is the distance.
:rtype: a double numpy array
"""
self.update(posorient)
return np.concatenate((self.image,
self.distance), axis=2)
toreturn = np.concatenate((self.image,
self.distance), axis=2)
return toreturn[..., np.newaxis]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment