Forum

Author Topic: Correlation matrix disappeared?  (Read 3073 times)

andyroo

  • Sr. Member
  • ****
  • Posts: 443
    • View Profile
Correlation matrix disappeared?
« on: May 23, 2020, 03:25:28 AM »
I've been running a series of tests with the same imagery (multiple conversion-to-jpeg parameters) and in one case, the correlation matrix disappeared in the chunks that were copied (via script) from the initial alignment chunk. I can't see anything different from the other projects - the alignment and optimization and script are all run in batch - (1) align, (2) optimize, (3) run script.

The script copies the original chunk and runs gradual selection, saving a new chunk each time it optimizes to a threshold value for first Reconstruction Uncertainty, then Projection accuracy, then Reprojection Error. All of the copied chunks have the correlation matrix grayed out.

I just tried copying manually and the correlation matrix survives the copy. I'll try running just the script again, guessing it will work, but wondering what would cause this...

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15083
    • View Profile
Re: Correlation matrix disappeared?
« Reply #1 on: May 24, 2020, 08:05:36 PM »
Hello andyroo,

Can you specify the steps performed by the script? Is that correct that you mean that chunk.copy() command doesn't transfer the correlation matrix to the chunk's copy?
Best regards,
Alexey Pasumansky,
Agisoft LLC

andyroo

  • Sr. Member
  • ****
  • Posts: 443
    • View Profile
Re: Correlation matrix disappeared?
« Reply #2 on: June 16, 2020, 05:25:57 AM »
Yes, it was chunk.copy() and it only happened once out of about 30 times, but I thought it was odd.

The copy command is third line from the bottom in this code:

Code: [Select]
        chunk = doc.chunk

        # check that chunk has a point cloud
        try:
            len(chunk.point_cloud.points)
        except AttributeError:
            # print exception so it will be visible in console
            print('AttributeError: Chunk "' + chunk.label + '" has no point cloud. Ensure that image '
                                                            'alignment was performed. Stopping execution.')
            raise AttributeError('Chunk "' + chunk.label + '" has no point cloud. Ensure that image alignment '
                                                           'was performed. Stopping execution.')

        # copy active chunk, rename, make active
        ru_chunk = chunk.copy()
        ru_chunk.label = chunk.label + '_RU' + str(parg.ru_filt_level)
        print('Copied chunk ' + chunk.label + ' to chunk ' + ru_chunk.label)