intelligent-control-lab / kinect_smoothing Goto Github PK
View Code? Open in Web Editor NEW"Kinect Smoothing" helps you to smooth and filter the Kinect depth image as well as trajectory data
License: MIT License
"Kinect Smoothing" helps you to smooth and filter the Kinect depth image as well as trajectory data
License: MIT License
Hi,
I have depth images in .bmp format.
Is that I have to convert my images to .pkl format? or is there any way to use the images directly?
Hi,
I am currently using this approach for real-time Kinect camera depth image smoothing. I collected 45 frames and send them into smoothing algorithm and then the algorithm got stuck at there forever. I changed to use just 2 frames but it didn't help at all. I wonder if I made any mistakes anywhere. Thanks for any hints.
Hello, I have tried some methods in this project ,and I find this project using so much 'for loop' ,it is too expensive ,to deal with an image may cost serveral seconds.
When I converted my depth images to .pkl file and ran the code, it gives me this error.
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-13-4693c0abb786> in <module>
1 hole_filter = HoleFilling_Filter(flag='min')
----> 2 hf_image_frame = hole_filter.smooth_image_frames(image_frame)
3 print('hole filled image frames (filled invalid values)')
4 plot_image_frame(hf_image_frame)
~/Desktop/Research Project/Matlab Code/Kinect_Smoothing-master/kinect_smoothing/depth_image_smoothing.py in smooth_image_frames(self, image_frames)
167 imgs=[imgs]
168 for img in imgs:
--> 169 res_img = self.smooth_image(img)
170 smoothed_frames.append(res_img)
171 return smoothed_frames
~/Desktop/Research Project/Matlab Code/Kinect_Smoothing-master/kinect_smoothing/depth_image_smoothing.py in smooth_image(self, image)
149 image = image.copy()
150 if self.flag in ['min','max','mean','mode']:
--> 151 smoothed_image = self.statistical_smoothing(image)
152 elif self.flag in ['fmi','ns']:
153 smoothed_image = self.inpainting_smoothing(image)
~/Desktop/Research Project/Matlab Code/Kinect_Smoothing-master/kinect_smoothing/depth_image_smoothing.py in statistical_smoothing(self, image)
110 """
111 smoothed = image.copy()
--> 112 h, w = image.shape
113 image[image <= self.valid_depth_min] = 0
114 image[image >= self.valid_depth_max] = 0
ValueError: too many values to unpack (expected 2)
After installing the requirements, I ran the kinect_preprocess_example.py and got error:
multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
File "C:\Anaconda3\lib\multiprocessing\pool.py", line 121, in worker
result = (True, func(*args, **kwds))
File "C:\Anaconda3\lib\multiprocessing\pool.py", line 44, in mapstar
return list(map(*args))
File "G:\My Drive\research\Sarah Ostadabbas\codePool\Kinect_Smoothing\kinect_preprocess_example.py", line 50, in kinect_preprocess
action, file_name = pose_path.split('/')[:-2]
ValueError: not enough values to unpack (expected 2, got 0)
"""The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "G:/My Drive/research/Sarah Ostadabbas/codePool/Kinect_Smoothing/kinect_preprocess_example.py", line 70, in
kicet_preprocess_multi(data_dir, pose_save_dir, num_thread=8)
File "G:/My Drive/research/Sarah Ostadabbas/codePool/Kinect_Smoothing/kinect_preprocess_example.py", line 62, in kicet_preprocess_multi
pool.map(partial(kinect_preprocess,pose_save_dir=pose_save_dir),img_files)
File "C:\Anaconda3\lib\multiprocessing\pool.py", line 268, in map
return self._map_async(func, iterable, mapstar, chunksize).get()
File "C:\Anaconda3\lib\multiprocessing\pool.py", line 657, in get
raise self._value
ValueError: not enough values to unpack (expected 2, got 0)
Process finished with exit code 1
OS: windows 10
python: 3.7
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.