Tuesday, September 13, 2016

Point Cloud Maker 11 (PCM11)

PCM11 generates a dense 3d point cloud from an image and its associated depth map. I think it can be an useful tool to assess the quality of the depth map. To view the generated dense 3d point cloud, there are several options (probably among many others):
- MeshLab,
- CloudCompare, and
- Sketchfab.

The manual for PCM11 is in the "ugosoft3d-11-x64.rar" archive. It thoroughly explains the parameters that are needed to run PCM11 via the input file "pcm11_input.txt".

Image for which we want to generate a dense point cloud. This image comes from one of the Middlebury stereo data sets. It is called "Art".

Depth map (ground-truth) for "Art" image.

Dense 3d point cloud obtained by PCM11 in the sketchfab 3d viewer:

Here is a video tutorial for pcm11:

The windows executable (guaranteed to be virus free) is available for free via the 3D Software Page.


  1. Hi Ugo, how should the min and max disparity for PCM11 related to the min and max disparity get from ER9B? and how should the focal length for PCM11 be calculated? Thanks.

    1. Good question! Use min disparity = 1 and max disparity = 1/30 x width (nearest integer). For the baseline, use 1/30 x width. For the focal length, use 1.2 x width. The depth in the 3d scene is defined by the formula baseline x focal length / disparity. That should give you an idea of what each parameter does when you change it. For example, if you increase the baseline or focal length, the depth of the 3d scene increases.

  2. I used Stereo Photo Maker split MPO files from my FUji W3 and resized them to 1200 width. I used ER9B to rectify them and then used DMAG6 to generate the depth map. For PCM11, based on your comment, I used this:
    @1;@2;1;40;1440.0;40.0;1;@5, where @? are file names I will replace. But the point clout generated using this min/max disparity are like a thin sharp cone shape. what went wrong here?
    BTW, I am writing a python script to automate these and want to make the min/max disparity calculated from the input generated by ER9B.
    Thanks again.

    1. you could use what er9b gives but shift the disparities so that the min disparity is 1. So if er9b says min=-10 and max=+10, use 1 for min and 21 for max. something like that. what you did seems reasonable. maybe i am missing something. can you send me your data?

    2. Sent an email to you, thanks!

    3. Hi Ugo,

      Thank you for the help. I played with the numbers and found this works the best for me.
      Here is the PCM11 input template I used:

      First, I get the difference between the min/max disparity generated by ER9B:
      totalDis = maxDis - minDis
      Then, I shift the disparities to the upper end by doing so:
      minDis = str(int(255 - totalDis))
      maxDis = str(255)
      Then I used this for focal length:
      fLength = str(int(120000 / totalDis))

      Then replace the parameters in the template:
      pcm11Out = pcm11Out.replace('@3', minDis)
      pcm11Out = pcm11Out.replace('@4', maxDis)
      pcm11Out = pcm11Out.replace('@5', fLength)

      Here is an example I uploaded to Sktchfab:

      Again, thank you for creating these amazing tools, I love them so much! Your tools helped me find a new way of presenting stereo images, I am so exciting and so addict to it :D



  3. Hi Ugo,

    Is it possible to enhance PCM11 to get rid of the withe edge from the point cloud? I found the L/R images rectified by ER9B and the depth map from DMAG6 all carry a small white edge with them. No sure if this is a good idea.

  4. Hi Ugo,

    I used SDOFG11 to smooth depth map itself (after smoothed by DMAG9B, both inputs for SDOFG11 are the depth map file name) and generated the point cloud from PCM11.
    Here are the comparsion:
    original: https://skfb.ly/66CuJ
    depth map smoothed by SDOFG11: https://skfb.ly/66CuW

    you will see less holes when turning the smoothed one, side effect is there are small distortion on some objects.

    1. SDOFG11 is for synthetic refocusing. What did you use to smooth the depth map after DMAG9b?