GithubHelp home page GithubHelp logo

intelligent-control-lab / kinect_smoothing Goto Github PK

View Code? Open in Web Editor NEW
88.0 7.0 13.0 30.97 MB

"Kinect Smoothing" helps you to smooth and filter the Kinect depth image as well as trajectory data

License: MIT License

Jupyter Notebook 99.68% Python 0.32%
kinect-v2 depth-image smoothing trajectory

kinect_smoothing's People

Contributors

walleclipse avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

kinect_smoothing's Issues

Running speed

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.

It's too expancive

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.

Comparison of results

Neither of these two methods seems to have obvious results. Is this reasonable?
Top: original vs Bottom: Denoising_Filter(flag="modeling", theta=60)
Kazam_screenshot_00000

Kazam_screenshot_00001

Value Error : too many values to unpack

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)

not enough values to unpack

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.