# Stereo camera point cloud

Source: https://forum.modalai.com/topic/600/stereo-camera-point-cloud
Category: Flight Core and Legacy VOXL (https://forum.modalai.com/category/9/flight-core-and-legacy-voxl)
Tags: voxl-cam
Posted: 2021-12-07 17:35:50 UTC by gauravshukla914
Replies: 7 · Views: 1930

## gauravshukla914 · 2021-12-07 17:35:50 UTC

HI, I have a VOXL flight deck with me with stereo,tracking and hi-res cameras. I want to visualise the point-cloud date from the stereo cameras. As of now, I'm having a hard time visualizing one in rviz. When I run the camera feed, on doing rostopic list, I get one of the topics as /dfs_pointcloud. However, I'm unable to see any pointcloud data on Rviz. Looking for some help on this.

## Reply by Guest · 2021-12-07 18:14:33 UTC

Hello @gauravshukla914 ,

If you are not dependent on ROS for visualization, you can use the latest dev version of voxl-portal to view pointclouds in a web browser. 

However, if you can see the topic via rostopic list you should be able to view in rviz as well (with  the "fixed frame" set to world). Can you share any errors or messages from rviz when you attempt to view?

## Reply by Darshan · 2022-02-07 12:58:22 UTC (in reply to Guest)

Hello @Matt-Turi ,
I am facing the same issue, am unable to get dense pointcloud data on /dfs_pointcloud rostopic. I tried to visualize detected object point cloud data on rviz, but the point cloud data coming on /dfs_pointcloud was not dense and clear. I tried the same approach for different physical dimensions of objects. Still data coming on rostopic is not clear. I have attached the raw images which have been taken during the process. Suggest me if i need to tune any params or need to follow any different installation instructions.![Screenshot from 2022-02-07 17-01-51.png](https://forum.modalai.com/assets/uploads/files/1644238608255-screenshot-from-2022-02-07-17-01-51.png) ![Screenshot from 2022-02-07 15-58-27.png](https://forum.modalai.com/assets/uploads/files/1644238608293-screenshot-from-2022-02-07-15-58-27.png)

## Reply by Guest · 2022-02-07 19:11:51 UTC

Hi @Darshan 

Can you look at the ```dfs_disparity``` or ```dfs_disparity_scaled``` images to help see if the issue lies with the actual dfs math or the visualization? Additionally, can you post the output of ```voxl-version```, it looks like you may be on an older version of our software suite and an update may help.

## Reply by Darshan · 2022-02-08 11:18:04 UTC

Hi @Alex-Gardner,
Am using ModalAI 3.3.0 version. I have connected my voxel camera kit with ros & able to visualise dfs_disparity/image_raw topic, stereo_left/image_raw, dfs_pointcloud topics data on Rviz. I have placed a obstacle in front of camera & at same time i tried visualise obstacle data on /dfs_disparity/image_raw topic. Observed that the data appears on dfs_disparity/image_raw topic was not clear and may due to this am getting very low density pointcloud points on /dfs_pointcloud topic. I have attached the rviz images which have taken during experiment.(![image 2.png](https://forum.modalai.com/assets/uploads/files/1644318997642-image-2.png) ![image1.png](https://forum.modalai.com/assets/uploads/files/1644318997685-image1.png) image url)

## Reply by Darshan · 2022-02-09 03:54:08 UTC

Hi,
Any suggestions for resolving this issue!

## Reply by Guest · 2022-02-09 18:49:00 UTC

It looks in these screenshots like the pointcloud is accurately reflecting the disparity image output by the dfs algorithm. The default settings for our DFS algorithm was used for 3d mapping/obstacle avoidance, where we want less noisy(and as a result less sharp) data. Thus we apply two fairly hefty median filters (a 17 pixel one and then a 7 pixel one). You can modify the intensity of these (or completely disable) in ```/etc/modalai/voxl-dfs-server.conf```. Additionally, you can increase the number of disparity levels for more data (though you will see significant increases in cpu usage by the algorithm if you do so).

## Reply by Darshan · 2022-02-11 14:06:31 UTC

Hi @Alex-Gardner,

I followed to tune params which you suggested in above, but still am not able get optimal dense pointcloud points. Is there any alternative approach in need to follow or i need combine any other depth sensor along with existing stereo.![alt text](![points.png](https://forum.modalai.com/assets/uploads/files/1644588385291-points.png) image url).
