Forum

Author Topic: Estimate image quality ignoring masked regions and disable images  (Read 1969 times)

pablorov

  • Newbie
  • *
  • Posts: 3
    • View Profile
Hi, I try to estimate the image quality and disable those that have a quality lower than 0.6, I have tried with the following code:

Code: [Select]
chunk.estimateImageQuality(chunk.cameras)
    for camera in chunk.cameras:
        if float(camera.photo.meta["Image/Quality"]) < 0.6:
            camera.enabled = False

However, the console reports the following error:

Code: [Select]
float() argument must be a string or a number, not 'NoneType'
What would be the correct code?

Also I would like to know if there is a parameter for the estimation to be carried out ignoring the masked areas, I reviewed the phyton agisoft guide but I did not find anything.

Thanks a lot

LFSantosgeo

  • Jr. Member
  • **
  • Posts: 70
    • View Profile
Try this!
Code: [Select]
camera.meta["Image/Quality"]
Hope it helps!
Luiz Fernando

pablorov

  • Newbie
  • *
  • Posts: 3
    • View Profile
thank you!
it works great.