Skip to content

Commit

Permalink
Merge pull request #44 from 20treeAI/feat/update_all_submodules
Browse files Browse the repository at this point in the history
feat: update all submodules to patches needed for mac compilation
  • Loading branch information
roelofvandijkO authored May 22, 2024
2 parents 22bfd99 + 031c167 commit 01ae8ab
Show file tree
Hide file tree
Showing 16 changed files with 20 additions and 79 deletions.
2 changes: 1 addition & 1 deletion 3rdparty/iio
Submodule iio updated 102 files
15 changes: 0 additions & 15 deletions 3rdparty/iio.patch

This file was deleted.

2 changes: 1 addition & 1 deletion 3rdparty/imscript
Submodule imscript updated 220 files
15 changes: 0 additions & 15 deletions 3rdparty/imscript.patch

This file was deleted.

2 changes: 1 addition & 1 deletion 3rdparty/mgm
Submodule mgm updated 8 files
+23 −0 .github/workflows/test.yml
+0 −10 .travis.yml
+23 −16 Makefile
+27 −19 README.txt
+2,413 −520 iio/iio.c
+42 −10 iio/iio.h
+130 −0 mgm.1
+206 −135 mgm.cc
15 changes: 0 additions & 15 deletions 3rdparty/mgm.patch

This file was deleted.

2 changes: 1 addition & 1 deletion 3rdparty/sift
Submodule sift updated from d1caf0 to 10a2af
2 changes: 1 addition & 1 deletion 3rdparty/sse2neon
Submodule sse2neon updated 1 files
+2 −2 sse2neon.h
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion 3rdparty/tvl1flow
Submodule tvl1flow updated 3 files
+0 −5 config.mk
+2,017 −504 iio.c
+3 −0 iio.h
15 changes: 0 additions & 15 deletions 3rdparty/tvl1flow.patch

This file was deleted.

2 changes: 1 addition & 1 deletion makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ ifeq ($(UNAME), Darwin)
export LIBRARY_PATH := ${LIBRARY_PATH}:/opt/homebrew/lib
export LD_LIBRARY_PATH := ${LD_LIBRARY_PATH}:/opt/homebrew/lib
# apply patches, ignore if they fail (already patched)
patch_osx = git apply 3rdparty/*.patch || true
patch_osx = git apply 3rdparty/submodule_patches/*.patch || true
endif

# these options are only used for the programs directly inside "./c/"
Expand Down
19 changes: 10 additions & 9 deletions s2p/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,8 @@ def pointing_correction(tile, i, cfg):
rpc2 = cfg['images'][i]['rpcm']

# correct pointing error
print('correcting pointing on tile {} {} pair {}...'.format(x, y, i))
if cfg["debug"]:
print('correcting pointing on tile {} {} pair {}...'.format(x, y, i))
method = 'relative' if cfg['relative_sift_match_thresh'] is True else 'absolute'
A, m = pointing_accuracy.compute_correction(
img1, img2, rpc1, rpc2, x, y, w, h, method,
Expand Down Expand Up @@ -178,8 +179,8 @@ def rectification_pair(tile, i, cfg):
rpc2 = cfg['images'][i]['rpcm']
pointing = os.path.join(cfg['out_dir'],
'global_pointing_pair_{}.txt'.format(i))

print('rectifying tile {} {} pair {}...'.format(x, y, i))
if cfg["debug"]:
print('rectifying tile {} {} pair {}...'.format(x, y, i))
try:
A = np.loadtxt(os.path.join(out_dir, 'pointing.txt'))
except IOError:
Expand Down Expand Up @@ -240,8 +241,8 @@ def stereo_matching(tile, i, cfg):
"""
out_dir = os.path.join(tile['dir'], 'pair_{}'.format(i))
x, y = tile['coordinates'][:2]

print('estimating disparity on tile {} {} pair {}...'.format(x, y, i))
if cfg["debug"]:
print('estimating disparity on tile {} {} pair {}...'.format(x, y, i))
rect1 = os.path.join(out_dir, 'rectified_ref.tif')
rect2 = os.path.join(out_dir, 'rectified_sec.tif')
disp = os.path.join(out_dir, 'rectified_disp.tif')
Expand Down Expand Up @@ -273,8 +274,8 @@ def disparity_to_height(tile, i, cfg):
"""
out_dir = os.path.join(tile['dir'], 'pair_{}'.format(i))
x, y, w, h = tile['coordinates']

print('triangulating tile {} {} pair {}...'.format(x, y, i))
if cfg["debug"]:
print('triangulating tile {} {} pair {}...'.format(x, y, i))
rpc1 = cfg['images'][0]['rpcm']
rpc2 = cfg['images'][i]['rpcm']
H_ref = np.loadtxt(os.path.join(out_dir, 'H_ref.txt'))
Expand Down Expand Up @@ -321,8 +322,8 @@ def disparity_to_ply(tile, cfg):
x, y, w, h = tile['coordinates']
rpc1 = cfg['images'][0]['rpcm']
rpc2 = cfg['images'][1]['rpcm']

print('triangulating tile {} {}...'.format(x, y))
if cfg["debug"]:
print('triangulating tile {} {}...'.format(x, y))
H_ref = os.path.join(out_dir, 'pair_1', 'H_ref.txt')
H_sec = os.path.join(out_dir, 'pair_1', 'H_sec.txt')
pointing = os.path.join(cfg['out_dir'], 'global_pointing_pair_1.txt')
Expand Down
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def finalize_options(self):
BdistWheel = None


requirements = ['numpy==1.22.2',
requirements = ['numpy>=1.22.2',
'scipy',
'rasterio[s3]==1.3.8',
'utm',
Expand All @@ -51,7 +51,7 @@ def finalize_options(self):
'plyfile',
'plyflatten>=0.2.0',
'ransac',
'rpcm @ git+https://github.com/20treeAI/[email protected].9',
'rpcm @ git+https://github.com/20treeAI/[email protected].11',
'srtm4',
'requests',
'opencv-python',
Expand All @@ -63,7 +63,7 @@ def finalize_options(self):
}

setup(name="s2p",
version="1.6.3",
version="1.6.4",
description="Satellite Stereo Pipeline.",
long_description=readme(),
long_description_content_type='text/markdown',
Expand Down

0 comments on commit 01ae8ab

Please sign in to comment.