Forum

Author Topic: Chunk.analyzePhotos() to evaluate the quality of my images?  (Read 1782 times)

Emanuele1234

  • Newbie
  • *
  • Posts: 14
    • View Profile
Hi everyone,

Sorry for bother you again, I have a problem with this script to evaluate images quality, because the name and method are changed over the versions of this program, and now I didn't find any good example to help me understand how to use this command better:

This is a for cycle, I just post the final part of the script where is the problem... because I don't know how to use this Metashape command.
The principal problem is this analyzePhotos that doesn't work, in fact, I made several try but every time this function give me a None result, and if I use float he tell me that I can't use this function because the data it's a none type, and this is normal...

Someone can help me to understand? thank you in advance,
Best regards.

Code: [Select]

                  if dist < mindis:
            mindis = dist
            mincam = camera
            mincam.label = camera.label  # camera with min distance to Principal Point
            selcam.append(mincam)  # append all the important parameters in a list of lists.
            plt.show()

    mincam.selected = True
   
    for IMAGE in selcam:
       
        if float(Metashape.Chunk.analyzePhotos(chunk, IMAGE)) < 0.7:
             print("IMAGE")


         

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14839
    • View Profile
Re: Chunk.analyzePhotos() to evaluate the quality of my images?
« Reply #1 on: June 24, 2021, 05:51:28 PM »
Hello Emanuele1234,

I think you should change the loop in the provided example to the following:

Code: [Select]
for IMAGE in selcam:
    chunk.analyzePhotos(IMAGE)
    if float(IMAGE.meta['Image/Quality']) < 0.7:
        print(IMAGE.label)
providing that chunk variable is related to the active chunk you are working with.
Best regards,
Alexey Pasumansky,
Agisoft LLC