Forum

Author Topic: Build Dem error in Photoscan 1.4.0  (Read 4700 times)

ppant

  • Jr. Member
  • **
  • Posts: 85
    • View Profile
Build Dem error in Photoscan 1.4.0
« on: January 17, 2018, 09:32:47 PM »
Hi,
I have a working Python script to communicate with photoscan 1.3.5 but when I upgrade to photoscan 1.4.0. the code fails. I fixed an issue with DenseCloudpoint generation. But not the issue is in DEM generation 
here is the code 

PhotoScan.app.console.clear()
doc = PhotoScan.app.document
psxfile ="c:/tmp/test.psx"   
doc.save( psxfile )
chunk = doc.addChunk()
chunk.matchPhotos(accuracy=PhotoScan.HighAccuracy, preselection=PhotoScan.ReferencePreselection, reference_preselection=True,keypoint_limit=40000,tiepoint_limit=4000)
chunk.alignCameras()
chunk.buildDepthMaps(quality=PhotoScan.UltraQuality,filter=PhotoScan.AggressiveFiltering)
chunk.buildDenseCloud(point_colors=True)
CS="EPSG::32634"
chunk.crs = PhotoScan.CoordinateSystem(CS)
chunk.exportPoints('c:/tmp/test.laz', colors=True, projection = chunk.crs)
doc.save( psxfile )
chunk.buildDem(source=PhotoScan.DenseCloudData, interpolation=PhotoScan.EnabledInterpolation, projection=chunk.crs)

the error I am getting here while calling  chunk.buildDem is

2018-01-17 13:24:03 Traceback (most recent call last):
2018-01-17 13:24:03   File "<console>", line 1, in <module>
2018-01-17 13:24:03 TypeError: expected CoordinateSystem object or 4x4 Matrix


Don't  know the source of error. It there a bug on buildDem ?. Because exportpoints is working well. 

Thank you for help in advance

pant





Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14860
    • View Profile
Re: Build Dem error in Photoscan 1.4.0
« Reply #1 on: January 17, 2018, 10:14:14 PM »
Helllo ppant,

Does it help, if you substitute the line doc.save( psxfile ) by doc.save() without any arguments?
Best regards,
Alexey Pasumansky,
Agisoft LLC

ppant

  • Jr. Member
  • **
  • Posts: 85
    • View Profile
Re: Build Dem error in Photoscan 1.4.0
« Reply #2 on: January 17, 2018, 10:52:38 PM »
Alexey
I tried that too. Sorry to say it is not helping. At all. So I am not sure with the source of error.

Thanks

ppant

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14860
    • View Profile
Re: Build Dem error in Photoscan 1.4.0
« Reply #3 on: January 17, 2018, 10:59:45 PM »
Hello ppant,

Can you please add debugging print lines right before buildDem line:
Code: [Select]
print(chunk.crs)
print(chunk)
Best regards,
Alexey Pasumansky,
Agisoft LLC

ppant

  • Jr. Member
  • **
  • Posts: 85
    • View Profile
Re: Build Dem error in Photoscan 1.4.0
« Reply #4 on: January 17, 2018, 11:04:07 PM »
Alexy
The outputs are like this

>>> print(chunk.crs)
2018-01-17 15:01:05 <CoordinateSystem 'WGS 84 / UTM zone 34N (EPSG::32634)'>
>>> print(chunk)
2018-01-17 15:01:17 <Chunk 'Chunk 1'>

I am bit confused because the  chunk.exportPoints('c:/tmp/test.laz', colors=True, projection = chunk.crs) is working fine but
dem is not

Thanks
ppant


Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14860
    • View Profile
Re: Build Dem error in Photoscan 1.4.0
« Reply #5 on: January 17, 2018, 11:13:44 PM »
Hello ppant,

And running the DEM generation via GUI works fine, I assume?

Also you can try to remove the projection argument and PhotoScan will use the default option - chunk coordinate system.
Best regards,
Alexey Pasumansky,
Agisoft LLC

ppant

  • Jr. Member
  • **
  • Posts: 85
    • View Profile
Re: Build Dem error in Photoscan 1.4.0
« Reply #6 on: January 17, 2018, 11:33:01 PM »
Alexy
Yes the GUI is working. It just python script is creating a problem. I go around the problem to generate the orthomosaic with this  changes in code 

Code: [Select]
chunk.buildModel(surface=PhotoScan.Arbitrary,interpolation=PhotoScan.EnabledInterpolation,source=PhotoScan.DenseCloudData)
chunk.buildOrthomosaic(surface=PhotoScan.ModelData, blending=PhotoScan.MosaicBlending)
chunk.exportOrthomosaic('c:/tmp/ortho.tif',projection=chunk.crs,tiff_compression=PhotoScan.TiffCompressionNone,jpeg_quality=99,white_background=False)

I will update you if not adding the projection will help in building dem or thank

now I have a question for Micasense  calibration will calling these to function helps or not 
Code: [Select]
chunk.locateReflectancePanels()
chunk.loadReference('c:/tmp/RP02-1648263-SC.csv')

So far I am able correct micasense Image via GUI interface I link to do that with python code too

ppant

  • Jr. Member
  • **
  • Posts: 85
    • View Profile
Re: Build Dem error in Photoscan 1.4.0
« Reply #7 on: January 18, 2018, 12:09:17 AM »
Alexy,
As you said removing the projection option the buildDem is working.

Thanks for the help.

Now the problem is my mosaic image look different from a result obtained from version 1.3.3 and 1.4.0. The version 1.4.0 geo tiff files are bigger the and georeference image are radically divergent from the center. Then the result from version1.3.3. I am sure which geo-reference image should be trusted.

Thanks
ppant.

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14860
    • View Profile
Re: Build Dem error in Photoscan 1.4.0
« Reply #8 on: January 18, 2018, 12:23:17 AM »
Hello ppant,

Can you provide the report files generate from 1.3 and 1.4 versions?
Best regards,
Alexey Pasumansky,
Agisoft LLC

ppant

  • Jr. Member
  • **
  • Posts: 85
    • View Profile
Re: Build Dem error in Photoscan 1.4.0
« Reply #9 on: January 18, 2018, 12:40:11 AM »
Alexy
Could you tell me where can I find the report files?

Thanks
ppant


Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14860
    • View Profile
Re: Build Dem error in Photoscan 1.4.0
« Reply #10 on: January 18, 2018, 12:40:47 AM »
Hello ppant,

You can generate them using File Menu -> Generate Report option.
Best regards,
Alexey Pasumansky,
Agisoft LLC

ppant

  • Jr. Member
  • **
  • Posts: 85
    • View Profile
Re: Build Dem error in Photoscan 1.4.0
« Reply #11 on: January 18, 2018, 01:28:33 AM »
Alexy
I can send you the report for the version 1.4.0.  Because we have updated our photoscan version. I only have pxs file for 1.3.4. Can photoscan 1.4.0  generate the report for version computed from 1.3.4.

Thanks

Ppant

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14860
    • View Profile
Re: Build Dem error in Photoscan 1.4.0
« Reply #12 on: January 18, 2018, 09:00:35 AM »
Hello ppant,

Yes, you can generate the report in the version 1.4 from the project generated in 1.3.
Best regards,
Alexey Pasumansky,
Agisoft LLC

ppant

  • Jr. Member
  • **
  • Posts: 85
    • View Profile
Re: Build Dem error in Photoscan 1.4.0
« Reply #13 on: January 18, 2018, 07:57:13 PM »
 
Could send me some email address where I can send the reports to you supports. 

Thanks

ppant

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14860
    • View Profile
Re: Build Dem error in Photoscan 1.4.0
« Reply #14 on: January 18, 2018, 08:48:36 PM »
Hello ppant,

You can send them to support@agisoft.com
Best regards,
Alexey Pasumansky,
Agisoft LLC