Items with no label
3335 Discussions

Can I change the resolution to 640x480x3 when I export a scene to PLY file with RealSense Viewer in Win10?

VT000
Beginner
1,419 Views
 
0 Kudos
8 Replies
MartyG
Honored Contributor III
685 Views

If you just want to set the resolution to 640x480, you can set the resolution of the 3D mode whilst the stream is turned off. You can then start the stream and use the Save icon to export the ply whilst the stream is running. Please left-click on the images below to view them in full size.

 

As you mention 640x480 x3, I wonder if you mean something else, though.

 

1.png

 

 

2.png

0 Kudos
VT000
Beginner
685 Views

Hello Marty,

Yes, I did this, but after I have exported the PLY file the resolution is reduced and I don't know why? Maybe there are some additional settings?

Yes, I need 640x480x3, or 307200x3 XYZ and RGB arrays.

Are there any additional settings? If you have the Viewer and one of D400 cameras, you can try it.

If I could save in PLY with proper resolution, my problem would be solved. I would have the XYZ and RGB arrays for image processing.

0 Kudos
MartyG
Honored Contributor III
685 Views

The subject of arrays in relation to ply files is outside of my experience. An Intel support team member may be able to ask the RealSense engineering team about it when they return on Monday (Intel Support hours are .Monday-Friday, 7AM to 4PM PST).

0 Kudos
VT000
Beginner
685 Views

Dear Marty,

I hope someone can help me. I don't know what is the problem with resolution preserving when I export to PLY? This should be a trivial thing solved only with resolution setup.

Also, I don't know what is the problem with the Matlab wrapper, bag files, generally with everything?

I have two great cameras (D415&D435), I have a good Viewer with fine tuneable capturing parameters and I can not get the point cloud and the RGB, XYZ arrays from it with Matlab. I am stucked more then 2 weeks, I can't do my image processing research because I can't get the required data.

It is unbelievable that we can not find solutions for this, anyplace.

I hope the RealSense engineering team has a solution for this. Will you ask them? Or, will you ask an Intel Support team member about this?

You know the nature of the problem: I have recorded a scene with the Viewer in bag file and I can't access the point cloud (and all it's data_) with Matlab. Also, the wrapper didn't work well and I can't set the resolution via PLY format export.

Thank you in advance.

 

0 Kudos
MartyG
Honored Contributor III
685 Views

I am not an Intel employee. and so I cannot refer issues to the developers and engineers in the same way that Intel Support employees can. I also do not have access to the internal information resources that they do. So if I do not have knowledge of a subject and cannot find an answer through researching publicly available information, Intel members have to handle the question. I do truly understand your frustration.

0 Kudos
Alexandra_C_Intel
685 Views
Hi VT1000, The PLY file has a different format that a 2D image file. It mostly consists of a number of vertices and corresponding x,y,z values. See this page for more details: http://paulbourke.net/dataformats/ply/. These points are what the camera is able to capture from the scene. The camera cannot assign a value to every single point in its field of view therefore it cannot have 640x480 points. To increase the number of depth points captured, use the "High Density" preset in RealSense Viewer. In order to convert the point cloud back to a 2D image with a 640x480 resolution you must use the function rs2_project_point_to_pixel(point, &intrinsics, vertex). See this discussion for more details: https://github.com/IntelRealSense/librealsense/issues/2204 and this header file: https://github.com/IntelRealSense/librealsense/blob/master/include/librealsense2/rsutil.h#L17. Regarding your issue with Matlab, please open another ticket clearly describing what you are trying to achieve and the problem you are encountering. Regards, Alexandra
0 Kudos
VT000
Beginner
685 Views

Dear Alexandra,

Thank you for the answer. Regarding the PLY file, that is only a spare idea.

 

The main idea is to get the point cloud with corresponding XYZ values and RGB values in 640x480x3 (307200x3 arrays) form the "bag" file captured by RealSense Viewer in Matlab.

I have opened a ticket about my problem already, MartyG was the main commentator on Intel's forum. This issue is opened on GitHub also.

 

If I can't do this from the "bag" file, I hope I can do this using live stream with Matlab wrapper, but how? What is the syntax for this in Matlab? I tried using pointcloud_example function, but I didn't get anything. Also, can I use the Viewer's parameter setups (edge preserving filter, hole filling etc.) during live streaming?

 

Kind regards

 

0 Kudos
Eliza_D_Intel
Employee
685 Views
Hello VT000, On one of your other threads, JBos3 provided an Matlab code that can help you acquire a pointcloud directly from the RealSense cameras - https://forums.intel.com/s/question/0D50P00004EqsCLSAZ/how-can-i-extract-the-point-cloud-and-rgb-xyz-arrays-from-bag-file-with-matlab-when-i-record-a-scene-using-realsense-viewer-in-win10-i-am-using-realsense-d415d435-and-the-data-are-stored-in-bag-file As for the parameters in RealSense Viewer, the Edge Preserving Filter is - https://github.com/IntelRealSense/librealsense/blob/79dda7f00ebde9564f1a2053b8ab95b7ba41ac69/wrappers/matlab/spatial_filter.m Hole filling - https://github.com/IntelRealSense/librealsense/blob/79dda7f00ebde9564f1a2053b8ab95b7ba41ac69/wrappers/matlab/temporal_filter.m You can find them all by searching in the Matlab folder for "filer", and when you open the code, you will see the correspondence in C++. For example, spacial_filer.m contains "rs2::spatial_filter" and so on. Is it possible to continue this conversation on the other thread (https://forums.intel.com/s/question/0D50P00004EqsCLSAZ/how-can-i-extract-the-point-cloud-and-rgb-xyz-arrays-from-bag-file-with-matlab-when-i-record-a-scene-using-realsense-viewer-in-win10-i-am-using-realsense-d415d435-and-the-data-are-stored-in-bag-file ) in order to make sure that we have all the information regarding your issue on a single thread? Thank you and best regards, Eliza
0 Kudos
Reply