Hi, I try to use depth image to refine the result, device is Kinect v2 and I use pylibfreenect2 to get RGB-D images in python.
Here is the problem:
Traceback (most recent call last):
File "/home/a/.vscode/extensions/ms-python.python-2019.10.41019/pythonFiles/ptvsd_launcher.py", line 43, in
main(ptvsdArgs)
File "/home/a/.vscode/extensions/ms-python.python-2019.10.41019/pythonFiles/lib/python/old_ptvsd/ptvsd/main.py", line 432, in main
run()
File "/home/a/.vscode/extensions/ms-python.python-2019.10.41019/pythonFiles/lib/python/old_ptvsd/ptvsd/main.py", line 316, in run_file
runpy.run_path(target, run_name='main')
File "/home/a/anaconda3/envs/py27/lib/python2.7/runpy.py", line 252, in run_path
return _run_module_code(code, init_globals, run_name, path_name)
File "/home/a/anaconda3/envs/py27/lib/python2.7/runpy.py", line 82, in _run_module_code
mod_name, mod_fname, mod_loader, pkg_name)
File "/home/a/anaconda3/envs/py27/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/home/a/Downloads/AugmentedAutoencoder-master/auto_pose/test/aae_retina_webcam_pose_kinect.py", line 166, in
all_pose_estimates, all_class_idcs = ae_pose_est.process_pose(boxes, labels, image0, depth1)
File "/home/a/Downloads/AugmentedAutoencoder-master/auto_pose/test/aae_retina_pose_estimator.py", line 212, in process_pose
R_est, t_est = self.icp_handle.icp_refinement(depth_crop, R_est, t_est, self._camK, (W,H), clas_idx=clas_idx, depth_only=True)
File "/home/a/.local/lib/python2.7/site-packages/auto_pose/icp/icp.py", line 177, in icp_refinement
print 'real min max x', np.min(real_depth_pts[:,0]), np.max(real_depth_pts[:,0])
File "/home/a/anaconda3/envs/py27/lib/python2.7/site-packages/numpy/core/fromnumeric.py", line 2618, in amin
initial=initial)
File "/home/a/anaconda3/envs/py27/lib/python2.7/site-packages/numpy/core/fromnumeric.py", line 86, in _wrapreduction
return ufunc.reduce(obj, axis, dtype, out, passkwargs)
ValueError: zero-size array to reduction operation minimum which has no identity**
the depth_image.shape is [542,414], and I save the depth image data like below:
……………………
0.000000000000000000e+00 1.922912353515625000e+03 0.000000000000000000e+00 1.884088623046875000e+03 0.000000000000000000e+00 1.822018188476562500e+03 1.898113159179687500e+03 1.828330566406250000e+03 0.000000000000000000e+00 1.919650512695312500e+03 1.870128906250000000e+03 0.000000000000000000e+00
……………………
I think the depth data is in mm.
And the RGB image can be used normally
I'm quiet confused,could you please give me some advice?
Thanks a lot!!!
Describe the bug
Hi, I try to use depth image to refine the result, device is Kinect v2 and I use pylibfreenect2 to get RGB-D images in python.
Here is the problem:
Traceback (most recent call last): File "/home/a/.vscode/extensions/ms-python.python-2019.10.41019/pythonFiles/ptvsd_launcher.py", line 43, in
main(ptvsdArgs)
File "/home/a/.vscode/extensions/ms-python.python-2019.10.41019/pythonFiles/lib/python/old_ptvsd/ptvsd/main.py", line 432, in main
run()
File "/home/a/.vscode/extensions/ms-python.python-2019.10.41019/pythonFiles/lib/python/old_ptvsd/ptvsd/main.py", line 316, in run_file
runpy.run_path(target, run_name='main')
File "/home/a/anaconda3/envs/py27/lib/python2.7/runpy.py", line 252, in run_path
return _run_module_code(code, init_globals, run_name, path_name)
File "/home/a/anaconda3/envs/py27/lib/python2.7/runpy.py", line 82, in _run_module_code
mod_name, mod_fname, mod_loader, pkg_name)
File "/home/a/anaconda3/envs/py27/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/home/a/Downloads/AugmentedAutoencoder-master/auto_pose/test/aae_retina_webcam_pose_kinect.py", line 166, in
all_pose_estimates, all_class_idcs = ae_pose_est.process_pose(boxes, labels, image0, depth1)
File "/home/a/Downloads/AugmentedAutoencoder-master/auto_pose/test/aae_retina_pose_estimator.py", line 212, in process_pose
R_est, t_est = self.icp_handle.icp_refinement(depth_crop, R_est, t_est, self._camK, (W,H), clas_idx=clas_idx, depth_only=True)
File "/home/a/.local/lib/python2.7/site-packages/auto_pose/icp/icp.py", line 177, in icp_refinement
print 'real min max x', np.min(real_depth_pts[:,0]), np.max(real_depth_pts[:,0])
File "/home/a/anaconda3/envs/py27/lib/python2.7/site-packages/numpy/core/fromnumeric.py", line 2618, in amin
initial=initial)
File "/home/a/anaconda3/envs/py27/lib/python2.7/site-packages/numpy/core/fromnumeric.py", line 86, in _wrapreduction
return ufunc.reduce(obj, axis, dtype, out, passkwargs)
ValueError: zero-size array to reduction operation minimum which has no identity**
the depth_image.shape is [542,414], and I save the depth image data like below: …………………… 0.000000000000000000e+00 1.922912353515625000e+03 0.000000000000000000e+00 1.884088623046875000e+03 0.000000000000000000e+00 1.822018188476562500e+03 1.898113159179687500e+03 1.828330566406250000e+03 0.000000000000000000e+00 1.919650512695312500e+03 1.870128906250000000e+03 0.000000000000000000e+00 …………………… I think the depth data is in mm. And the RGB image can be used normally
I'm quiet confused,could you please give me some advice? Thanks a lot!!!