# How is the DTM generated on PIX4D Desktop?

**URL:** <https://community.pix4d.com/t/how-is-the-dtm-generated-on-pix4d-desktop/3015>\
**Category:** PIX4Dmapper Questions/Troubleshooting\
**Created:** [March 28, 2017, 12:54am UTC](https://community.pix4d.com/t/how-is-the-dtm-generated-on-pix4d-desktop/3015 "2017-03-28T00:54:50Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Marcelo\_Hung](https://avatars.discourse-cdn.com/v4/letter/m/278dde/32.png) [@Marcelo\_Hung](https://community.pix4d.com/u/Marcelo_Hung)\
**Post date:** [March 28, 2017, 12:54am UTC](https://community.pix4d.com/t/how-is-the-dtm-generated-on-pix4d-desktop/3015/1 "2017-03-28T00:54:50Z")

</div>

Hello.

I would like to know how the PIX4D desktop generates the DTM from DSM.  
How does the program know what soil or tree or building is? What calculations does the program do for this?

---

<div class="post-metadata">

**Author:** ![Timbang\_Deli](https://sea2.discourse-cdn.com/pix4d/user_avatar/community.pix4d.com/timbang_deli/32/356_2.png) [@Timbang\_Deli](https://community.pix4d.com/u/Timbang_Deli)\
**Post date:** [April 5, 2017, 4:46am UTC](https://community.pix4d.com/t/how-is-the-dtm-generated-on-pix4d-desktop/3015/2 "2017-04-05T04:46:30Z")

</div>

Very good question. I also want to know in detail and hear from p4d team.

---

<div class="post-metadata">

**Author:** ![Antigoni\_Makri](https://sea2.discourse-cdn.com/pix4d/user_avatar/community.pix4d.com/antigoni_makri/32/187_2.png) [@Antigoni\_Makri](https://community.pix4d.com/u/Antigoni_Makri)\
**Post date:** [April 5, 2017, 10:42am UTC](https://community.pix4d.com/t/how-is-the-dtm-generated-on-pix4d-desktop/3015/3 "2017-04-05T10:42:54Z")

</div>

Hello Marcelo and Timbang,

The DTM algorithm takes as input the DSM and it smooths it so as to remove the buildings, trees and other objects.&nbsp;

The software will first try to estimate what is a building by looking at the height gradient. After this, there will be a smoothing operation, while trying to maintain the original data. It is an iterative algorithm, so it is unfortunately difficult to give more details than this. You can also take a look at the following article about the DTM generation approach:&nbsp;[http://gpu4vision.icg.tugraz.at/papers/2009/unger\_isvc09.pdf#pub38](http://gpu4vision.icg.tugraz.at/papers/2009/unger_isvc09.pdf#pub38).

Regards,

---

<div class="post-metadata">

**Author:** ![Marcelo\_Hung](https://avatars.discourse-cdn.com/v4/letter/m/278dde/32.png) [@Marcelo\_Hung](https://community.pix4d.com/u/Marcelo_Hung)\
**Post date:** [April 5, 2017, 6:45pm UTC](https://community.pix4d.com/t/how-is-the-dtm-generated-on-pix4d-desktop/3015/4 "2017-04-05T18:45:58Z")

</div>

Thank you for the information.
