Forum

Author Topic: Export DTM(Digital Terrain Model) as orthophoto binary mask.  (Read 4806 times)

photoscan_user

  • Jr. Member
  • **
  • Posts: 98
    • View Profile
Here is a tutorial to create DTM(Digital Terrain Model)
http://www.agisoft.com/index.php?id=35

But I want to know, is there any way to export  DTM as orthophoto binary mask, i.e. I want to overlay this mask with orthophoto to make sure point cloud classification done correctly and buildings are detected.

stihl

  • Sr. Member
  • ****
  • Posts: 410
    • View Profile
Re: Export DTM(Digital Terrain Model) as orthophoto binary mask.
« Reply #1 on: July 18, 2016, 01:03:18 PM »
In photoscan after you've generated a DTM and Ortho, you can view these within Photoscan.
There's a button on the toolbar once you've loaded the Ortho in the Ortho viewer inside Photoscan to switch between Ortho and DTM view. This way you can validate the ground classification for the DTM.

photoscan_user

  • Jr. Member
  • **
  • Posts: 98
    • View Profile
Re: Export DTM(Digital Terrain Model) as orthophoto binary mask.
« Reply #2 on: July 18, 2016, 02:27:54 PM »
Yes, but I need binary mask of ground and binary mask of objects like houses, vegetation etc.

photoscan_user

  • Jr. Member
  • **
  • Posts: 98
    • View Profile
Re: Export DTM(Digital Terrain Model) as orthophoto binary mask.
« Reply #3 on: July 18, 2016, 04:18:14 PM »
As one solution that I can imagine I can generate DSM and then generate DTM and then just subtract DTM from DSM DIFF= DSM-DTM to obtain only "objects map" and then binarize DIFF image using some threshold.

But for some reason photoscan generates DSM and DTM slightly different especially on borders of valid area, also slightly different size.
How to fix this problems?
Also my question is how to gerate orthomap exatly the same size?

My test data from here
https://github.com/OpenDroneMap/odm_data_bellus/tree/4ea68df4c03a495fa3476dc157de5f90afe9d72d
Here is results. Tiff files are float32 so you need special viewer for them, also images are downsampled by x2 factor.

DSM
https://habrastorage.org/files/c06/34c/d6e/c0634cd6ec4f45fab161f5ab4bfd009a.tif

DTM
https://habrastorage.org/files/561/37b/635/56137b63568043a6ab39214eda6be5ed.tif

Orthomap
https://habrastorage.org/files/bc2/742/394/bc27423946494ef1af163ca5b468cb3e.png

DIFF= DSM-DTM
https://habrastorage.org/files/65b/9ab/99c/65b9ab99c4e04ab59b9ed5b35716f82e.tif

After clean up DIFF by using threshold
https://habrastorage.org/files/9be/bde/8b6/9bebde8b66a04afabf101b34c25503b5.tif

After making diff binary
https://habrastorage.org/files/128/c29/d0c/128c29d0c29a4e5d9049ee6318220d48.png

stihl

  • Sr. Member
  • ****
  • Posts: 410
    • View Profile
Re: Export DTM(Digital Terrain Model) as orthophoto binary mask.
« Reply #4 on: July 18, 2016, 04:22:18 PM »
To make the files the same size (geographical dimensions) you can double click on the Ortho and DEM in the workspace panel. If you open them in the viewer you can create a polygon.. If you right click it you can set it as a boundary (outline on which the Ortho and DEM get cropped to).