-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mapper.py is a slow in converting between color space to depth space #14
Comments
if i use |
Unfortunately, I do not have a Kinect Device anymore to test it, but I do believe that the reason the function is slow is that I perform some operations that are only needed when you pass the show = True flag. The only reason I have put that flag is to test how the aligned image shows, but it slows down the performance by a lot. I suggest no to use the show = True, and only call this function to get the points and then decide on how you want to display them. I will push some changes in a moment that make some computations happen only when show is True. |
Can you pull the changes and try again to see if you can see a drop in fps, but do not pass the show flag? |
hello i use this code below but terminal has a problem " "depth_2_color_space" is not defined" although i did import mapper library. import mapper if name == 'main':
|
try importing like this: from mapper import * |
oh i have a problem with my code and i fixed it, thank you so much your source code is very useful. |
@dongtamlx18 I have another repo that I use mapper to draw real time (30fps) point clouds with color and depth simultaneously: https://github.com/KonstantinosAng/PyKinect2-PyQtGraph-PointClouds |
You are amazing but i have a problem when i test your code. I don't know why is this happen?from PointCloud import Cloud pcl = Cloud(file='models/model.pcd')
|
I have used this open3d version: 0.10.0.1try:
and then:
|
i can use function pcl.visualize() for |
Helllo sir, i scroll on Youtube and people said that Open3D lib does not support create pointcloud data, i do not know does it right or not so im here to ask you about that question. And could you help me to introduce me some technique that using KinectV2 to create pointcloud? Thank you so much! |
Excuse me, could I ask you a question? I noticed in the source code that
you swapped the x, y, z coordinates from the 'world_points' numpy array to
'x, y, z' coordinates. I am not sure why you did that. Does it have any
specific significance or meaning? Thank you in advance!
[image: image.png]
Vào Th 4, 12 thg 7, 2023 vào lúc 22:09 CyberBoy ***@***.***>
đã viết:
… I have used this open3d version:
0.10.0.1
try:
pip uninstall open3d
and then:
pip install open3d==0.10.0.1
—
Reply to this email directly, view it on GitHub
<#14 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AKW4B5W3AQOJ3YPL5WQF7PTXP24ZVANCNFSM6AAAAAASIO74HI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***
com>
|
First of all, about the Open3d: I do not know if you can create a Pointcloud with open3d, I only use it to visualize Pointcloud files (.ply, .pcd) that I create manually in my Repository. If you see my code you will see that I get the world point from Kinect and I manually create the file using the basic structure of the (.ply, .pcd) file format. Second, about the x, y, z coordinates: Where exactly do I swap the values because I cannot find the function ? |
Hi, thanks for your reply. The x, y, z coordinates are not created by a
function, but in these lines of code below:
self._dynamic_point_cloud[:, 0] = world_points[:, 0]
self._dynamic_point_cloud[:, 1] = world_points[:, 2]
self._dynamic_point_cloud[:, 2] = world_points[:, 1]
I see that you changed them by using an array. Is it true, or did I
misunderstand something? Thank you
Vào Th 5, 3 thg 8, 2023 vào lúc 15:00 CyberBoy ***@***.***>
đã viết:
… First of all, about the Open3d:
I do not know if you can create a Pointcloud with open3d, I only use it to
visualize Pointcloud files (.ply, .pcd) that I create manually in my
Repository
<https://github.com/KonstantinosAng/PyKinect2-PyQtGraph-PointClouds>. If
you see my code you will see that I get the world point from Kinect and I
manually create the file using the basic structure of the (.ply, .pcd) file
format.
Second, about the x, y, z coordinates:
Where exactly do I swap the values because I cannot find the function ?
—
Reply to this email directly, view it on GitHub
<#14 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AKW4B5QXNZMVHJD2CHI53FDXTNLCPANCNFSM6AAAAAASIO74HI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***
com>
|
I did this because the z coordinate for Kinect is the distance from Kinect to the object and the Y coordinate is the distance of the object from the ground to the Kinect. I always had the Z coordinate as the distance from the floor so I swapped the values to suit me better. |
Hey Thank you so much!
I'm trying to estimate the normal vector of this white tilted object in the
picture below. I don't know much about Open3D processing, could you give me
some advice on this? Which preprocessing should I do before estimating the
normal vector or some keywords to find information easier? Thank you!
[image: image.png]
And here is the ply file which created by your PointCloud source code:
Vào Th 5, 3 thg 8, 2023 vào lúc 17:42 CyberBoy ***@***.***>
đã viết:
… I did this because the z coordinate for Kinect is the distance from Kinect
to the object and the Y coordinate is the distance of the object from the
ground to the Kinect. I always had the Z coordinate as the distance from
the floor so I swapped the values to suit me better.
—
Reply to this email directly, view it on GitHub
<#14 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AKW4B5XOLBXSBZ4OSSJFLDTXTN6BHANCNFSM6AAAAAASIO74HI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***
com>
|
I think for image processing it is better to use OpenCV. |
Thanks for the tip! kaka
I've completed several preprocessing steps, including cropping the point
cloud (which might be similar to a pass-through filter), plane
segmentation, and outlier removal. Thanks for providing the point cloud
source. Now, I'm moving on to the final step: estimating the normal
vectors. Here is an image for reference.
Vào Th 3, 8 thg 8, 2023 vào lúc 14:32 CyberBoy ***@***.***>
đã viết:
… I think for image processing it is better to use OpenCV.
To compute the normal vector you have to find 3 points in the plane that
you are looking for and to find the plane in the image can be difficult if
the colors mix. Start looking for a way to first identify the tilted object
in the image accurately.
—
Reply to this email directly, view it on GitHub
<#14 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AKW4B5QDE53VVVJXAEQBUQLXUHTQTANCNFSM6AAAAAASIO74HI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***
com>
|
I am using python 3.7 64bit.
i did not do pip install since it seems to not work in that way. rather using the given files directly via import.
However the issue is that running
mapper.py
is very slow. 0.5 fps is the frame rate. I think waitKey(3000) is the reason. But that still does not fix the issue:When i set show = False that improves but still slow and not smooth 25/30fps. Rather somewhere around 8/10fps.
Any solution to this issue? When i do not call depth_2_color_space the speed is just back to 25/30fps i can say.
The text was updated successfully, but these errors were encountered: