- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
Could you explain what does the below line of code means or do.
source from:
http://docs.ros.org/kinetic/api/librealsense2/html/align-depth2color_8py_source.html
bg_removed = np.where((depth_image_3d > clipping_distance) | (depth_image_3d <= 0), grey_color, color_image)
If I want to split the bg_removed into two parameters, for example to x and y. How can I do this? I tried:
x,y = np.where((depth_image_3d > clipping distance)&(depth_image_3d <=0))but I am getting Value error: "too many values to unpack (expected 2)"
Lien copié
5 Réponses
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
Hi NeuroGalaxy,
Thank you for your interest in the Intel RealSense cameras.
The code line removes background - Sets pixels further than clipping_distance to grey.
Regarding your second question, can you please tell me what data do you want in your x, y variables? What specifically are you trying to do?
Regards,
Alexandra
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
Thanks for explaining the line of code. I understand it now.
I was trying to calculate the distance using the depth information. If I convert it to X,Y and find the mean of this variables (X,Y), will it display the distance in meters?
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
Hi NeuroGalaxy,
You can use this example to get the distance:
https://github.com/IntelRealSense/librealsense/tree/master/examples/C/distance
Regards,
Alexandra
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
Thank you. Is it possible to get this code in Python?
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
Hi NeuroGalaxy,
This python sample will help: https://github.com/IntelRealSense/librealsense/blob/master/wrappers/python/examples/python-tutorial-1-depth.py
Regards,
Alexandra
Répondre
Options du sujet
- S'abonner au fil RSS
- Marquer le sujet comme nouveau
- Marquer le sujet comme lu
- Placer ce Sujet en tête de liste pour l'utilisateur actuel
- Marquer
- S'abonner
- Page imprimable