Skip to content

Alternative to using enabled property of photo when using Metashape multispectral projects #77

Answered by HowcanoeWang
Ken-Kuroki asked this question in Q&A
Discussion options

You must be logged in to vote

Currently EasyIDP is not designed for dealing with multispecral projects, could you share that project for testing?

Or just for this task you mentioned here, if you can ensure that all imageset are 5 tif files, you can do this way:

enabled_photos = []
root_enabled = False:
for pid, photo in enumerate(ms.photos):
    # 0 % 5 = 0, 1 % 5 = 1, 
    # 5 % 5 = 0, 6 % 5 = 1, ...
    if pid % 5 == 0:   # the start photo
        if photo.enabled:
            root_enabled = True
        else:
            root_enabled = False
    if root_enabled:
        enabled_photos.append(photo)

It will pick up all enabled photos that you want

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Ken-Kuroki
Comment options

Answer selected by Ken-Kuroki
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants