Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ RUN bash configure.sh installruntimedeps \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
&& bash run.sh --help \
&& bash -c "eval $(python3 /code/opendm/context.py) && python3 -c 'from opensfm import io, pymap'"
&& bash -c "eval $(python3 /code/modules/context.py) && python3 -c 'from opensfm import io, pymap'"

# Entry point
ENTRYPOINT ["python3", "/code/run.py"]
2 changes: 1 addition & 1 deletion contrib/dem-blend/dem-blend.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
sys.path.insert(0, os.path.join("..", "..", os.path.dirname(__file__)))

import argparse
from opendm.dem import merge
from modules.dem import merge

parser = argparse.ArgumentParser(description='Merge and blend DEMs using ODX\'s approach.')
parser.add_argument('input_dems',
Expand Down
2 changes: 1 addition & 1 deletion contrib/pc2dem/pc2dem.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import argparse
import multiprocessing
from opendm.dem import commands
from modules.dem import commands

parser = argparse.ArgumentParser(description='Generate DEMs from point clouds using ODX\'s algorithm.')
parser.add_argument('point_cloud',
Expand Down
2 changes: 1 addition & 1 deletion contrib/resize/resize.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from multiprocessing.pool import ThreadPool
import sys
sys.path.append("../../")
from opendm.gcp import GCPFile
from modules.gcp import GCPFile

parser = argparse.ArgumentParser(description='Exif Image Resize')
parser.add_argument('--input', '-i',
Expand Down
2 changes: 1 addition & 1 deletion gpu.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ RUN bash configure.sh installruntimedeps \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
&& bash run.sh --help \
&& bash -c "eval $(python3 /code/opendm/context.py) && python3 -c 'from opensfm import io, pymap'"
&& bash -c "eval $(python3 /code/modules/context.py) && python3 -c 'from opensfm import io, pymap'"

# Entry point
ENTRYPOINT ["python3", "/code/run.py"]
4 changes: 2 additions & 2 deletions innosetup.iss
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Name: "english"; MessagesFile: "compiler:Default.isl"
[Files]
Source: "contrib\*"; DestDir: "{app}\contrib"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "licenses\*"; DestDir: "{app}\licenses"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "opendm\*"; DestDir: "{app}\opendm"; Excludes: "__pycache__"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "modules\*"; DestDir: "{app}\modules"; Excludes: "__pycache__"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "stages\*"; DestDir: "{app}\stages"; Excludes: "__pycache__"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "SuperBuild\install\bin\*"; DestDir: "{app}\SuperBuild\install\bin"; Excludes: "__pycache__"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "SuperBuild\install\lib\python3.12\*"; DestDir: "{app}\SuperBuild\install\lib\python3.12"; Excludes: "__pycache__"; Flags: ignoreversion recursesubdirs createallsubdirs
Expand Down Expand Up @@ -157,6 +157,6 @@ end;
Type: filesandordirs; Name: "{app}\SuperBuild"
Type: filesandordirs; Name: "{app}\contrib"
Type: filesandordirs; Name: "{app}\licenses"
Type: filesandordirs; Name: "{app}\opendm"
Type: filesandordirs; Name: "{app}\modules"
Type: filesandordirs; Name: "{app}\stages"
Type: filesandordirs; Name: "{app}\venv"
File renamed without changes.
4 changes: 2 additions & 2 deletions opendm/ai.py → modules/ai.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import os
from opendm.net import download
from opendm import log
from modules.net import download
from modules import log
import zipfile
import time
import sys
Expand Down
10 changes: 5 additions & 5 deletions opendm/align.py → modules/align.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
import numpy as np
import rasterio
from rasterio.crs import CRS
from opendm.utils import double_quote
from opendm import log
from opendm import io
from opendm import system
from opendm.concurrency import get_max_memory
from modules.utils import double_quote
from modules import log
from modules import io
from modules import system
from modules.concurrency import get_max_memory

def get_point_cloud_crs(file):
pipeline = pdal.Pipeline(json.dumps([ file ]))
Expand Down
2 changes: 1 addition & 1 deletion opendm/arghelpers.py → modules/arghelpers.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from opendm import log
from modules import log
from shlex import _find_unsafe
import json
import os
Expand Down
4 changes: 2 additions & 2 deletions opendm/bgfilter.py → modules/bgfilter.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
import cv2
import os
import onnxruntime as ort
from opendm import log
from opendm.ai import read_image
from modules import log
from modules.ai import read_image
from threading import Lock

mutex = Lock()
Expand Down
4 changes: 2 additions & 2 deletions opendm/boundary.py → modules/boundary.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
import io
import json
from pyproj import CRS
from opendm.location import transformer
from modules.location import transformer
from osgeo import ogr
from opendm.shots import get_origin
from modules.shots import get_origin

def compute_boundary_from_shots(reconstruction_json, buffer=0, reconstruction_offset=(0, 0)):
if not os.path.isfile(reconstruction_json):
Expand Down
2 changes: 1 addition & 1 deletion opendm/camera.py → modules/camera.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import os, json
from opendm import log
from modules import log

def get_cameras_from_opensfm(reconstruction_file):
"""
Expand Down
8 changes: 4 additions & 4 deletions opendm/cogeo.py → modules/cogeo.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import os
import shutil
from opendm import system
from opendm.concurrency import get_max_memory
from opendm import io
from opendm import log
from modules import system
from modules.concurrency import get_max_memory
from modules import io
from modules import log

def convert_to_cogeo(src_path, blocksize=256, max_workers=1, compression="DEFLATE", deflate_predictor=2):
"""
Expand Down
2 changes: 1 addition & 1 deletion opendm/concurrency.py → modules/concurrency.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import queue
import threading
import time
from opendm import log
from modules import log

def get_max_memory(minimum = 5, use_at_most = 0.5):
"""
Expand Down
6 changes: 3 additions & 3 deletions opendm/config.py → modules/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

import yaml

from opendm import context
from opendm import io
from opendm import log
from modules import context
from modules import io
from modules import log
from pyodm import Node, exceptions

# parse arguments
Expand Down
File renamed without changes.
12 changes: 6 additions & 6 deletions opendm/cropper.py → modules/cropper.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
from opendm import context
from opendm.system import run
from opendm import log
from opendm.point_cloud import export_summary_json
from modules import context
from modules.system import run
from modules import log
from modules.point_cloud import export_summary_json
from osgeo import ogr
import fiona
import fiona.crs
import json, os
from opendm.concurrency import get_max_memory
from opendm.utils import double_quote
from modules.concurrency import get_max_memory
from modules.utils import double_quote

class Cropper:
def __init__(self, storage_dir, files_prefix = "crop"):
Expand Down
8 changes: 4 additions & 4 deletions opendm/cutline.py → modules/cutline.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
import numpy as np
import math
import sys
from opendm import log
from opendm import io
from opendm import concurrency
from opendm import system
from modules import log
from modules import io
from modules import concurrency
from modules import system

from skimage.feature import canny
from skimage.draw import line
Expand Down
File renamed without changes.
14 changes: 7 additions & 7 deletions opendm/dem/commands.py → modules/dem/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
import shutil
import glob
import re
from opendm.system import run
from opendm import point_cloud
from opendm import io
from opendm import system
from opendm.concurrency import get_max_memory
from modules.system import run
from modules import point_cloud
from modules import io
from modules import system
from modules.concurrency import get_max_memory
from datetime import datetime
from opendm.vendor.gdal_fillnodata import main as gdal_fillnodata
from opendm import log
from modules.vendor.gdal_fillnodata import main as gdal_fillnodata
from modules import log

from . import pdal

Expand Down
8 changes: 4 additions & 4 deletions opendm/dem/merge.py → modules/dem/merge.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
from scipy import ndimage
import rasterio
from rasterio.transform import Affine, rowcol
from opendm import system
from opendm.dem.commands import compute_euclidean_map
from opendm import log
from opendm import io
from modules import system
from modules.dem.commands import compute_euclidean_map
from modules import log
from modules import io
import os

def euclidean_merge_dems(input_dems, output_dem, creation_options={}, euclidean_map_source=None):
Expand Down
6 changes: 3 additions & 3 deletions opendm/dem/pdal.py → modules/dem/pdal.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@
import sys
import json as jsonlib
import tempfile
from opendm import system
from opendm import log
from opendm.utils import double_quote
from modules import system
from modules import log
from modules.utils import double_quote

from datetime import datetime

Expand Down
File renamed without changes.
File renamed without changes.
10 changes: 5 additions & 5 deletions opendm/entwine.py → modules/entwine.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import os
import sys
import shutil
from opendm.utils import double_quote
from opendm import io
from opendm import log
from opendm import system
from opendm import concurrency
from modules.utils import double_quote
from modules import io
from modules import log
from modules import system
from modules import concurrency


def build(input_point_cloud_files, output_path, max_concurrency=8, rerun=False):
Expand Down
6 changes: 3 additions & 3 deletions opendm/exiftool.py → modules/exiftool.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
import tempfile
import base64
from rasterio.io import MemoryFile
from opendm.system import run
from opendm import log
from opendm.utils import double_quote
from modules.system import run
from modules import log
from modules.utils import double_quote

def extract_raw_thermal_image_data(image_path):
try:
Expand Down
4 changes: 2 additions & 2 deletions opendm/gcp.py → modules/gcp.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
import os
import math
import json
from opendm import log
from opendm import location
from modules import log
from modules import location
from pyproj import CRS

def fromFile(imgName):
Expand Down
4 changes: 2 additions & 2 deletions opendm/geo.py → modules/geo.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import os
import math
from opendm import log
from opendm import location
from modules import log
from modules import location
from pyproj import CRS

class GeoFile:
Expand Down
2 changes: 1 addition & 1 deletion opendm/get_image_size.py → modules/get_image_size.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from PIL import Image
import cv2
import rawpy
from opendm import log
from modules import log

Image.MAX_IMAGE_PIXELS = None

Expand Down
6 changes: 3 additions & 3 deletions opendm/gltf.py → modules/gltf.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
import warnings
import numpy as np
import pygltflib
from opendm import system
from opendm import io
from opendm import log
from modules import system
from modules import io
from modules import log

warnings.filterwarnings("ignore", category=rasterio.errors.NotGeoreferencedWarning)

Expand Down
2 changes: 1 addition & 1 deletion opendm/gpu.py → modules/gpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import shutil
import ctypes
from functools import lru_cache
from opendm import log
from modules import log

def gpu_disabled_by_user_env():
return bool(os.environ.get('ODM_NO_GPU')) or bool(os.environ.get('ODX_NO_GPU'))
Expand Down
4 changes: 2 additions & 2 deletions opendm/gsd.py → modules/gsd.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import numpy as np
import math
from functools import lru_cache
from opendm import log
from opendm.shots import get_origin
from modules import log
from modules.shots import get_origin
from scipy import spatial

def image_max_size(photos, target_resolution, reconstruction_json, gsd_error_estimate = 0.5, ignore_gsd=False, has_gcp=False):
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion opendm/location.py → modules/location.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import math
from opendm import log
from modules import log
from pyproj import Proj, Transformer, CRS
from osgeo import osr

Expand Down
2 changes: 1 addition & 1 deletion opendm/log.py → modules/log.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import multiprocessing
from functools import lru_cache

from opendm.arghelpers import double_quote, args_to_dict
from modules.arghelpers import double_quote, args_to_dict
from vmem import virtual_memory

if sys.platform == 'win32' or os.getenv('no_ansiesc'):
Expand Down
12 changes: 6 additions & 6 deletions opendm/mesh.py → modules/mesh.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
from __future__ import absolute_import
import os, shutil, sys, struct, random, math, platform
from opendm.dem import commands
from opendm import system
from opendm import log
from opendm import context
from opendm import concurrency
from opendm import point_cloud
from modules.dem import commands
from modules import system
from modules import log
from modules import context
from modules import concurrency
from modules import point_cloud
from scipy import signal
import numpy as np

Expand Down
6 changes: 3 additions & 3 deletions opendm/multispectral.py → modules/multispectral.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
import re
import cv2
import os
from opendm import dls
from modules import dls
import numpy as np
from opendm import log
from opendm.concurrency import parallel_map
from modules import log
from modules.concurrency import parallel_map
from opensfm.io import imread

from skimage import exposure
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion opendm/nvm.py → modules/nvm.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import os
from opendm import log
from modules import log

def replace_nvm_images(src_nvm_file, img_map, dst_nvm_file):
"""
Expand Down
File renamed without changes.
File renamed without changes.
Loading
Loading