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 - dense_data

Pages: [1]
1
General / Re: 2D Line Drawing from Photoscan Model
« on: July 24, 2018, 12:54:56 AM »
Not sure if I missed the point, but instead of tracing you could import the mesh into a 3D modelling software (such as Blender) and do a non-photorealistic rendering (with Freestyle)  to get a line drawing.

2
General / Re: Import Bundler .out.list.txt (Image order)
« on: July 22, 2018, 05:01:36 PM »
This script allows you to rename the images so that PhotoScan treats them in the right order:
DISCLAIMER: I'm not responsible for any damage or problems this script might cause. Use it responsibly.

Code: [Select]
import os
import sys
import argparse


def load_bundler_list(bundler_list_path, fileformat, reverse):
    lines = {}
    with open(bundler_list_path, "r") as file:
            for idx, line in enumerate(file):
                if line == "":
                    break
                if reverse:
                    lines[str(idx) + fileformat] = line.strip();
                else:
                    lines[line.strip()] = str(idx) + fileformat;
    return lines

def load_image_names(img_source_path):
    images = []
    for root, dirs, files in os.walk(img_source_path, topdown=True):
        images.extend(files)
        break
    return images

def rename_file(path, old_name, new_name):
    src = os.path.join(path, old_name)
    dst = os.path.join(path, new_name)
    os.rename(src, dst)
    print("old name: {}, new name: {}".format(src, dst))

def rename_file_to_match_bundler(img_source_path, bundler_list_path, filename_prefix, fileformat, reverse):
    images = load_image_names(img_source_path)
    bundler = load_bundler_list(bundler_list_path, fileformat, reverse)

    for image in images:
        if image.startswith(filename_prefix) and image.endswith(fileformat):
            old_name = image
            new_name = bundler[image]
            rename_file(img_source_path, old_name, new_name)

if __name__ == "__main__":

    parser = argparse.ArgumentParser(description="Image renamer - Renames image to reflect order in *.out.list.txt when sorted alphanumerically")
     
    parser.add_argument("--source", type=str, help="Path that will be searched for images.", required=True)
    parser.add_argument("--bundler", type=str, help="Path to bundler *.out.list.txt", required=True)
    parser.add_argument("--prefix", type=str, help="Filename needs to start with this string, otherwise the file is ignored.", required=True)
    parser.add_argument("--format", type=str, help="Image format, file ending.", required=True)

    parser.add_argument('--reverse', help="Restore old name.", dest='reverse', action='store_true')
    parser.set_defaults(reverse=False)

    args = parser.parse_args()

    rename_file_to_match_bundler(args.source, args.bundler, args.prefix, args.format, args.reverse)

3
General / Re: Import Bundler .out.list.txt (Image order)
« on: July 22, 2018, 03:55:50 PM »
I'll probably just write a script to rename my images, but this would certainly be a feature most people need when importing bundler projects.

4
General / Re: Major Speed and memory managment overhaul needed
« on: July 22, 2018, 03:54:37 PM »
While this may be true, I have to agree with the OP that PhotoScan is quite memory hungry compared to other software.

5
General / Import Bundler .out.list.txt (Image order)
« on: July 22, 2018, 03:28:41 PM »
I tried to import cameras and dense point cloud from another software into PhotoScan to generate the textures. Unfortunately the import of Bundler files entirely ignores the .out.list.txt which indicates which camera in the .out files belong to which image. This obviously causes weird results in the texture since each camera uses a different image than it should. This can be solved by manually renaming all images in Photoscan and sorting the cameras, but honestly that isn't a workable approach when I have more than a couple (the actual project I'm trying to work on has ~ 2000 images).

Is there any way to either make PhotoScan use the .out.list.txt or another trick to sort the cameras accordingly?

6
General / Re: Advanced setting for dense reconstruction
« on: July 13, 2018, 12:05:48 AM »
Thank you, very much! Looks much better already!

7
General / Re: Advanced setting for dense reconstruction
« on: July 12, 2018, 03:49:27 PM »
Can anybody help?

8
General / Advanced setting for dense reconstruction
« on: July 08, 2018, 09:57:36 PM »
I've attempted to perform a rather ambitious dense reconstructions with PhotoScan Standard. While everything works quite fast because of GPU acceleration, I've hit the (apparently) well known bottleneck of dense point cloud create after successfully creating depth maps. There seem to be a couple tricks posted in this forum which should speed up the process namely by reducing the number of maximum neighbors, because "excessive" overlap seems to cause PhotoScan to become sluggish. Now the problem is *those* settings are apparently only accessible in the form of python commands, e.g. as shown here http://www.agisoft.com/forum/index.php?topic=8361.0

Is there any way to adjust these settings in PhotoScan Standard?

(Hint: This would also be nice as a new feature, GPU accelerated dense point cloud creation)

Pages: [1]