You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,I have read many similar questions before, but I still have two questions about pointclouds with D415 as below.
1.I used the code of the official scripts named opencv_pointcloud_viewer.py to display the pointclouds of camera.The first question is about the size of variance "out".I set h=480, w=640 and which are the same as the raw color and depth pictures' size. Then I found the 3D picture's center is not along the camera color center. It's on the top left of the center like the picture below.
But when I changed h=960,w=1240 or the number similar large, I found the 3D picture's center is on the correct place like below.
Would you plesase tell me why and how to deal with it? Because I want to make the window smaller and seems normal.
2.I made some processing on the color_image,such as face recognition. I just wanted to save the pointclouds like face ROI but not the whole picture with 640*480 size. But I found rs.frame type cannot cut cannot crop an area individually. Would you please tell me how to change the picture type(I mean the face region) of np.array into rs.frame to generate pointclouds or how to just get the ROI from rs.frame type?
Looking forward to your reply!Thank you!
The text was updated successfully, but these errors were encountered:
Hi @piaorou-tech What results do you get if you leave the opencv_pointcloud_viewer.py script mostly in its original state without altering h,w and instead define specific resolution sizes for depth and color on lines 82 and 83.
In regard to your second question: I would recommend avoiding trying to convert a numpy array into rs2::frame, as other RealSense users have explored how to do so but not arrived at a clear solution yet to the best of my knowledge. This subject is discussed in #5784
#2769 (comment) has a suggestion for scripting for using a ROI with a Python pointcloud that looks as though it would be compatible with the code of opencv_pointcloud_viewer.py
Issue Description
Hello,I have read many similar questions before, but I still have two questions about pointclouds with D415 as below.
1.I used the code of the official scripts named opencv_pointcloud_viewer.py to display the pointclouds of camera.The first question is about the size of variance "out".I set h=480, w=640 and which are the same as the raw color and depth pictures' size. Then I found the 3D picture's center is not along the camera color center. It's on the top left of the center like the picture below.

But when I changed h=960,w=1240 or the number similar large, I found the 3D picture's center is on the correct place like below.

Would you plesase tell me why and how to deal with it? Because I want to make the window smaller and seems normal.
2.I made some processing on the color_image,such as face recognition. I just wanted to save the pointclouds like face ROI but not the whole picture with 640*480 size. But I found rs.frame type cannot cut cannot crop an area individually. Would you please tell me how to change the picture type(I mean the face region) of np.array into rs.frame to generate pointclouds or how to just get the ROI from rs.frame type?
Looking forward to your reply!Thank you!
The text was updated successfully, but these errors were encountered: