Forum

Author Topic: Problems with orthophoto of buildings  (Read 6087 times)

nadar

  • Full Member
  • ***
  • Posts: 130
    • View Profile
Problems with orthophoto of buildings
« on: March 10, 2015, 11:31:19 AM »
I'm trying to produce a clean orthophoto of a build-up area:

about 50% of the area is covered with residential houses and industrial hangars.
Photos were aquired in vertical view from a drone flying 75 m. ground resolution is about 1.5 cm
(sorry for double posting: I first added this requets for help in an existing topic, but did not get any answer...)

I generate a high quality densecloud. It looks fine (not too noisy).
If I generate the ortho using the mesh generetaed from the whole cloud, a got jagged roof borders, etc.
If I generate a mesh from a cloud filtered to keep only ground points, I got large triangles in the buliding areas, and this creates discontinuities in the roofs.

I'm now trying to export the classified cloud to Global Mapper, select ground points and calculate a raster DEM from these points. Seems OK
Then I generate a TIN model and I export it as DXF.
When I Import this DXF into Photoscan (using tools / import mesh), the TIN imports OK, but seems upside down:
when the model is view from the top, the mesh is displayed in dark grey.
If I rotate the whole model 180°, then the mesh is correct (various hues of blue), but applying textures doesn't work.
Does anybody have a suggestion to either flip the DXF model before importing, or rotate the mesh inside Photoscan ?

More generally: how do you deal with this type of images ?
Thanks

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14847
    • View Profile
Re: Problems with orthophoto of buildings
« Reply #1 on: March 10, 2015, 12:35:46 PM »
Hello nadar,

If you create a mesh in PhotoScan, export it as DXF and then import back the same model - is it properly oriented in the model space?
Best regards,
Alexey Pasumansky,
Agisoft LLC

nadar

  • Full Member
  • ***
  • Posts: 130
    • View Profile
Re: Problems with orthophoto of buildings
« Reply #2 on: March 11, 2015, 12:53:41 PM »
Thank you for your suggestions.

I generate a mesh from all classes of the dense cloud. I decimate to 100000 faces (just to speed up)
The resulting mesh is OK: buildings are extruding from ground level; the upside face is colored in blue. If I rotate the model, I can seed the downside face displayed in dark grey.

Then I export the (decimated) mesh to Autocad Civil 3D 2015 as "3Dfaces DXF".
Export is fine: the model is correctly oriented (top of the buildings are oriented towards up direction)
I edit the mesh in Autocad, by selecting and deleting a few faces.
I export the edited mesh, also as DXF, using a different name.
I import this mesh in Photoscan (Tools/import/import mesh)
The geometry of the mesh is OK (buildings extruding from ground surface and oriented upside), but now the upside faces are dark grey and the downside faces are blue. (see attached image).
I suspect this is a problem with the orientation of normals but I don't know how the solve this.

PS. The original model is projected (Lambert). I tried the same procedure using local coordiantes, but the results are the same.

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14847
    • View Profile
Re: Problems with orthophoto of buildings
« Reply #3 on: March 11, 2015, 01:16:20 PM »
Hello nadar,

It seems that there's an issue with model import from DXF format (inverted normals). So I suggest to run the following script to invert them back:

Code: [Select]
import PhotoScan
chunk = PhotoScan.app.document.chunk
faces = chunk.model.faces
for face in faces:
    face.vertices = (face.vertices[0], face.vertices[2], face.vertices[1])
Best regards,
Alexey Pasumansky,
Agisoft LLC

nadar

  • Full Member
  • ***
  • Posts: 130
    • View Profile
Re: Problems with orthophoto of buildings
« Reply #4 on: March 11, 2015, 01:57:36 PM »
Works fine ! (should I add "as usual" ?)

I will try using a "clean" DTM to generate orthos and will keep you informed about the results.

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14847
    • View Profile
Re: Problems with orthophoto of buildings
« Reply #5 on: March 16, 2015, 12:53:07 PM »
Hello nadar,

Could you please check the DXF export from the latest version (1.1.4), whether there are no more problems with the inverted normals?
Best regards,
Alexey Pasumansky,
Agisoft LLC

nadar

  • Full Member
  • ***
  • Posts: 130
    • View Profile
Re: Problems with orthophoto of buildings
« Reply #6 on: March 24, 2015, 06:35:32 PM »
Sorry for this late reply (I was travelling).

Today I exported a mesh as DXF using v. 1.1.4. Open the exported file in Global Mapper and Autocad Civil 3D. Both exports are OK (i.e. with normals oriented as expected).
Then I edited the mesh in Global Mapper (just removing some vertices), saved again as DXF and imported back to Photoscan.
The normals are now exactly as expected.
Consider this minor bug as solved. Thanks.

BTW: I'm really impressed by the efficiency of Photoscan to display heavy 3D meshes. AutoCad really struggles handling a 1-million faces mesh that displays smoothly in Photoscan !