Agisoft Metashape

Agisoft Metashape => Python and Java API => Topic started by: glennk on April 01, 2022, 11:34:21 PM

Title: Multiframe color calibration
Post by: glennk on April 01, 2022, 11:34:21 PM
Hello,

I am trying to calibrate the colors of each frame of my multi-frame chunk.

This is my code :
Code: [Select]
for frame in doc.chunk.frames:
    frame.calibrateColors(Metashape.PointCloudData)


Only the colors of the first frame get calibrated.

What am I doing wrong here ?

Best regards,

Glenn

PS :  Using Metashape.ModelData instead of Metashape.PointCloudData give me very weird results.

Title: Re: Multiframe color calibration
Post by: glennk on April 02, 2022, 01:01:12 AM
Struggling for hours, and finding a solution minutes after the post...  ::)

Setting the frame as active worked :

Code: [Select]
for frame in doc.chunk.frames:
    doc.chunk.frame = frame.key
    frame.calibrateColors(ms.PointCloudData, white_balance=True)

I hope it may be helpful for others.