-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Metashape project unable to load photos in multiple subfolders #74
Comments
This has been fixed, but please notice, the camera label will become "100MEDIA-DJI_0001" rather than "DJI_0001" |
Thank you! This works now for the example project I provided -- great! However, I tested this for a more common use case for me -- multiple layers of nested folders -- and it didn't work (same error as before). Here is an example folder structure:
To reproduce it, you can use this example metashape project file (which is based on this image set). If you have time, I wonder if you would consider updating the method to tolerate an arbitrary level of nesting (or at least 5 levels). |
Actually, what I did for this fix, it just supported an extra layer about the "camera group" in the metashape (the previous version did not support camera group)
the EasyIDP package doesn't care about how the raw image folder is structured, it just read the path data stored in metashape project ( <?xml version="1.0" encoding="UTF-8"?>
<frame version="1.2.0">
<cameras>
<camera camera_id="0">
<photo path="../../../../../../tnc-yuba-2021/example-nested-folders/80m/e-w/card01/100MEDIA/DJI_0001.JPG"> And parse the relative path to absolute path. The reason why you got the "same" (actually not exactly the same) error is that in your given project: The camera-group name and image name are duplicated, hence the later image label will overwrite the previous image label, and cause the image-id not matching the total number. In this 211f185 updates, I handled such case, if the project has the duplicated camera-group name, it will return the label like Hoping this fix helps for your project. |
Thank you! This works now and it allows me to process my projects. I really appreciate you building in this tolerance for nested folder structures. |
Most of my photogrammetry (Metashape) projects involve processing photos that are nested within subfolders; for example:
But when I try to load such a Metashape project in EasyIDP, I get:
IndexError: Index [0] out of range (0, 0)
.To reproduce it, you can download this example metashape project file (which is based on this image set) and run:
The full error returned is:
The error occurs even if the photo file names are not duplicated across the folders (which is true of the example I ran and linked to here). Ideally, EasyIDP would tolerate multiple subfolders and an arbitrary folder nesting depth (at least to 5 levels).
The text was updated successfully, but these errors were encountered: