Alternative to using enabled
property of photo when using Metashape multispectral projects
#77
-
Hi! When I tried EasyIDP with Metashape multispectral projects (captured with P4M), I found ms = easyidp.Metashape(proj_path, chunk_id=0)
enabled_photos = [photo for photo in ms.photos if photo.enabled] only keeps a small portion of images, and to be exact only blue band images like the following:
It seems like for all other bands On Metashape these images are bandled into five-image sets represented by blue image, and this is probably why EasyIDP sees the rest of colors not enabled. I can implement a workaround to check their status as a set in my code, but I'd appreciate if you could tell me any smarter way to do it. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
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 |
Beta Was this translation helpful? Give feedback.
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:
It will pick up all enabled photos that you want