Forum

Author Topic: chunk.crs being reset by AddPhotos  (Read 2270 times)

EE

  • Newbie
  • *
  • Posts: 26
    • View Profile
chunk.crs being reset by AddPhotos
« on: September 25, 2020, 11:05:01 AM »
Dear,

I am confused for the usage of the chunk.crs. The following snippet and output shows the reset chunk.crs by addPhotos:
Code: [Select]
print(str(chunk.crs))
chunk.crs = Metashape.CoordinateSystem('EPSG::32633')
print(str(chunk.crs))
chunk.addPhotos(image_paths)
print(str(chunk.crs))

Code: [Select]
<CoordinateSystem 'WGS 84 (EPSG::4326)'>
<CoordinateSystem 'WGS 84 / UTM zone 33N (EPSG::32633)'>
AddPhotos
<CoordinateSystem 'WGS 84 (EPSG::4326)'>

Related to this weird behaviour, could you explain what the chunk.crs influences? Currently it seems that when setting it to the local crs of the markers, I get more memory errors or bad_allocs further in the process.
We also do all build steps in this local crs, as a last question, does this make sense or when do you suggest to use the `projection` parameter for steps such as buildDem?

Thanks a lot for your help
Looking forward to your explanations

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14843
    • View Profile
Re: chunk.crs being reset by AddPhotos
« Reply #1 on: September 25, 2020, 05:49:21 PM »
Hello EE,

I think that the crs is changing due to the new geotaged images added to the project.

As for the errors related to the camera alignment with the markers, can you please check, if you are no longer observing that in version 1.6.5 pre-release. The links are available from the following post:
https://www.agisoft.com/forum/index.php?topic=12211.msg55948#msg55948
Best regards,
Alexey Pasumansky,
Agisoft LLC

EE

  • Newbie
  • *
  • Posts: 26
    • View Profile
Re: chunk.crs being reset by AddPhotos
« Reply #2 on: September 25, 2020, 06:02:27 PM »
Thanks a lot for your prompt reply Alexey.

Could you elaborate on the usecase of the chunk crs? I imagined setting it to a local coordinate system in which the markers were also tagged would be a benefit, is this not the case? Should we just leave it untouched so the addPhotos can set it to the photos crs?

I am not sure if we will have the time to upgrade our version to a pre-release and test well in the coming weeks but I will try my best. If we succeed, I will let you know for sure.

Many thanks

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14843
    • View Profile
Re: chunk.crs being reset by AddPhotos
« Reply #3 on: September 28, 2020, 06:35:02 PM »
Hello EE,

I am not sure which task you are trying to solve - why not all the images are added in the beginning?

Usually you load all images to the project, then modify the coordinate system and introduce the markers, if necessary.
Best regards,
Alexey Pasumansky,
Agisoft LLC

EE

  • Newbie
  • *
  • Posts: 26
    • View Profile
Re: chunk.crs being reset by AddPhotos
« Reply #4 on: September 28, 2020, 06:39:00 PM »
I was just wondering in which cases it is beneficial to set the chunk crs?
The same for building the orthomosaics in a specified projection (I assume chunk.crs is the default)?

To clarify a bit:
- We used to set the chunk.crs to our marker_crs as we believed this would be beneficial.
- We noticed the chunk.crs was not actually set due to the addPhotos resetting it

So now I'm just wondering if it makes sense to edit them or we should just not set the chunk.crs ever.

I hope this is a bit clearer, many thanks

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14843
    • View Profile
Re: chunk.crs being reset by AddPhotos
« Reply #5 on: September 28, 2020, 07:28:56 PM »
Hello EE,

chunk.crs should correspond to the coordinate system used for cameras/markers coordinate measurement, unless individual .crs are set for markers and cameras.

If you are looking to get the results in the same coordinate system, in which the markers of your project are measured, I suggest to set chunk.crs in accordance to the markers crs. If it is local coordinate system that is not convertible to geographic systems, the workflow might be the following:
- add images,
- load geotags (WGS84),
- set chunk.crs as WGS84,
- align photos,
- uncheck cameras in the Reference pane (for each camera set camera.reference.enabled = False),
- switch chunk.crs to the Local Coordinates (or other system corresponding to markers),
- add markers and load coordinate information for them,
- optimize alignment and proceed with the further processing steps.
Best regards,
Alexey Pasumansky,
Agisoft LLC