Forum

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - fran.garcia

Pages: [1]
1
Feature Requests / Re: ability to filter tie points by variance
« on: March 18, 2023, 12:48:50 AM »
Hi if there´s any way to do it please help

2


i like to aling 20 groups of frames but in pairs, i mean, 1-2 after the aligment disable group 1 and enable group 3 and aling, after disable 2 , enable 4 and aling......
The problem is that when i run manually selecting the groups and enableing and disabeling is working but if i run
Code: [Select]
enabled_cameras = []
        for camera in chunk.cameras:
            if camera.enabled:
                enabled_cameras.append(camera)
        chunk.matchPhotos(cameras=enabled_cameras, downscale=1, generic_preselection=True, keypoint_limit=50000, tiepoint_limit=15000)       
        chunk.alignCameras()
the first pair is working but when i disable the 1 and enable the 3 the ouput is
Warning: Can't resume matching without keypoints
Keep key points is enables
version is 1.84 but the same problem in all the versions

What can i do?

Thanks for the help

3
Python and Java API / Re: rolling shutter compensation via API
« on: March 14, 2023, 10:07:00 PM »
Thanks so much Alex¡¡
And one more thing because i am having a lot of problems with an script,
i like to aling 20 groups of frames but in pairs, i mean, 1-2 after the aligment disable group 1 and enable group 3 and aling, after disable 2 , enable 4 and aling......
The problem is that when i run manually selecting the groups and enableing and disabeling is working but if i run
Code: [Select]
enabled_cameras = []
        for camera in chunk.cameras:
            if camera.enabled:
                enabled_cameras.append(camera)
        chunk.matchPhotos(cameras=enabled_cameras, downscale=1, generic_preselection=True, keypoint_limit=50000, tiepoint_limit=15000)       
        chunk.alignCameras()
the first pair is working but when i disable the 1 and enable the 3 the ouput is
Warning: Can't resume matching without keypoints
Keep key points is enables
version is 1.84 but the same problem in all the versions

What can i do?

Thanks for the help

4
Python and Java API / rolling shutter compensation via API
« on: March 12, 2023, 09:22:37 PM »
Hi i need to activate rolling shutter compensation in phyton, i know how to check if it´s enabled but not how to Enable. Thanks¡¡¡

6
i have exactly the same problem

7
Python and Java API / add folder like the gui
« on: January 26, 2023, 10:29:51 PM »
hi, i tried this code to add a folder with 11 subfolders, i need to mantain the same structure but it doesn´t work well , the script fills the folder in a random way. Any help??
Code: [Select]
import Metashape
import os
doc = Metashape.app.document
chunk = doc.chunk
def find_files(folder, types):
    files = []
    for root, dirs, filenames in os.walk(folder):
        for filename in filenames:
            if os.path.splitext(filename)[1].lower() in types:
                files.append(os.path.join(root, filename))
    return files

def import_subfolders(folder):
    # Crear un nuevo proyecto en Metashape
    doc = Metashape.app.document
    for root, dirs, files in os.walk(folder):
        for dir in dirs:
            # Crear un nuevo grupo para cada subdirectorio
            group=chunk.addCameraGroup()
            group.label = dir
           
            # Encontrar todas las fotos en el subdirectorio
            photos = find_files(os.path.join(root, dir), [".jpg", ".jpeg", ".tif", ".tiff"])
            # Añadir las fotos al chunk
            chunk.addPhotos(photos,group=group.label)
    # Guardar el proyecto

# Usa la funcion anterior para importar todos los subdirectorios en una carpeta dada
image_folder = Metashape.app.getExistingDirectory("Selecciona la carpeta de imagenes:")
import_subfolders(image_folder)

Pages: [1]