Forum

Author Topic: How to get values of estimateImageQuality() in version 1.4  (Read 2572 times)

Yoshihiro

  • Newbie
  • *
  • Posts: 6
    • View Profile
How to get values of estimateImageQuality() in version 1.4
« on: April 18, 2018, 07:48:50 AM »
Hi,
When I select photos before alignment, I used a code like below.

Code: [Select]
import PhotoScan

for chunk in PhotoScan.app.document.chunks:
    chunk.estimateImageQuality(chunk.cameras)
    for camera in chunk.cameras:
        if float(camera.photo.meta["Image/Quality"]) < 0.7:
            camera.enabled = False
    chunk.matchPhotos(accuracy = PhotoScan.MediumAccuracy)
    chunk.alignCameras()

But after I updated PhotoScan version from 1.3 to 1.4,  this code does not work.
camera.photo.meta[Image/Quality] does not exists after estimateImageQuality().

How can I get/compare "Image/Quality" value?

Is this my misunderstanding??

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14813
    • View Profile
Re: How to get values of estimateImageQuality() in version 1.4
« Reply #1 on: April 18, 2018, 11:40:54 AM »
Hello Yoshihiro,

In the version 1.4 the image quality has been moved to camera.meta, so it should be:
Code: [Select]
camera.meta["Image/Quality"]
Best regards,
Alexey Pasumansky,
Agisoft LLC

Yoshihiro

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: How to get values of estimateImageQuality() in version 1.4
« Reply #2 on: April 24, 2018, 08:03:37 AM »
Thank you, Alexey.
Everything goes well.

Geend

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: How to get values of estimateImageQuality() in version 1.4
« Reply #3 on: April 24, 2018, 03:37:05 PM »
This seems to not be true for 1.4.0. It still is camera.photo.meta["Image/Quality"] in that version. Maybe in more recent version it changed. The api reference is not 100% clear about that.

LFSantosgeo

  • Jr. Member
  • **
  • Posts: 70
    • View Profile
Re: How to get values of estimateImageQuality() in version 1.4
« Reply #4 on: May 10, 2018, 07:44:53 PM »
This seems to not be true for 1.4.0. It still is camera.photo.meta["Image/Quality"] in that version. Maybe in more recent version it changed. The api reference is not 100% clear about that.

I've experienced the same! Some changes are not up to 1.4.0 but maybe from 1.4.1 forward.
Luiz Fernando