Shell is not a LinearRing
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.8/site-packages/arosics/CoReg.py", line 314, in __init__
self._get_image_params()
File "/usr/local/lib/python3.8/site-packages/arosics/CoReg.py", line 449, in _get_image_params
self.ref = GeoArray_CoReg(self.params, 'ref')
File "/usr/local/lib/python3.8/site-packages/arosics/CoReg.py", line 125, in __init__
if not self.footprint_poly.is_valid:
File "/usr/local/lib/python3.8/site-packages/shapely/geometry/base.py", line 731, in is_valid
return bool(self.impl['is_valid'](self))
File "/usr/local/lib/python3.8/site-packages/shapely/predicates.py", line 24, in __call__
self._validate(this)
File "/usr/local/lib/python3.8/site-packages/shapely/topology.py", line 18, in _validate
raise ValueError("Null geometry supports no operations")
ValueError: Null geometry supports no operations
Hi. I had to rebuild my docker container and I ended up upgrading and I'm getting the following warning printing continuously in the log:
/usr/local/lib/python3.6/dist-packages/arosics/CoReg.py:1383: UserWarning: SSIM input array shapes are not equal! This issue seemed to be already fixed..
My job then fails with:
File "process.py", line 125, in process
CRL.correct_shifts()
File "/usr/local/lib/python3.6/dist-packages/arosics/CoReg_local.py", line 754, in correct_shifts
self.calculate_spatial_shifts()
File "/usr/local/lib/python3.6/dist-packages/arosics/CoReg_local.py", line 437, in calculate_spatial_shifts
self._tiepoint_grid.get_CoRegPoints_table()
File "/usr/local/lib/python3.6/dist-packages/arosics/Tie_Point_Grid.py", line 400, in get_CoRegPoints_table
results = results.get()
File "/usr/lib/python3.6/multiprocessing/pool.py", line 644, in get
raise self._value
ValueError: Input images must have the same dimensions.
Any ideas on why this is happening? I'm having a hard time downgrading. Thanks!
Hello Daniel!
I'm starting to experiment with AROSICS. I've tried to co-registrate two images taken from a DataCube and as you say on your paper about AROSICS I'm applying that with a loop. I want to append the co-registered band to the same cube, and I got this Error:
IndexError: dimension coordinate 'lat' conflicts between indexed and indexing objects:
<xarray.DataArray 'lat' (lat: 224)>
array([13.78654 , 13.78663 , 13.78672 , ..., 13.806448, 13.806538, 13.806628])
Coordinates:
* lat (lat) float64 13.79 13.79 13.79 13.79 ... 13.81 13.81 13.81 13.81
Attributes:
standard_name: latitude
long_name: latitude
units: degrees_north
vs.
<xarray.IndexVariable 'lat' (lat: 224)>
array([13.78654 , 13.78663 , 13.78672 , ..., 13.806448, 13.806538, 13.806628])
Attributes:
units: degrees north
long_name: latitude
standard_name: latitude
To overcome that i set only values (with .values method) to my new co-registered band. Doing this means that I keep the lat/lon from original band.
My question about that is: to set values only is a good form to overcome it?
I decided to keep original lat/lon because if I compare it I got difference 0 (for example: original_lat - new_lat returns 0)
Thanks!
Hi Daniel,
I am trying to register two WorldView-2 images. Both images have cloud, so I am trying to use mask_baddata_ref and mask_baddata_tgt. I couldn't find a clear instruction for me on how to do this. So, I assign mask_baddata_ref and mask_baddata_tgt variables to the mask files in a specific folder. The mask files contain 0 and 1 value, with 1 as the mask (e.g, clouds) and 0 as other obejcts.
But in the results, some tie points are in the cloud.
Any help would be very much appreciated.
Thanks.
Firman.
Hi @danschef_gitlab I've got a failure that I'm trying to debug. I can writeup a github ticket and share the dataset however I wanted to run it by you here first in case I'm missing something obvious.
Stacktrace:
/opt/conda/envs/arosics/lib/python3.9/site-packages/arosics/CoReg.py:1178: RuntimeWarning: invalid value encountered in true_divide
temp = np.array(fft_arr0 * fft_arr1.conjugate()) / (np.abs(fft_arr0) * np.abs(fft_arr1) + eps)
progress: |==================================================| 99.8% Complete => 0:03:29
progress: |==================================================| 99.9% Complete => 0:03:29
progress: |==================================================| 100.0% Complete => 0:03:29
multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
File "/opt/conda/envs/arosics/lib/python3.9/multiprocessing/pool.py", line 125, in worker
result = (True, func(*args, **kwds))
File "/opt/conda/envs/arosics/lib/python3.9/multiprocessing/pool.py", line 48, in mapstar
return list(map(*args))
File "/opt/conda/envs/arosics/lib/python3.9/site-packages/arosics/Tie_Point_Grid.py", line 306, in _get_spatial_shifts
CR.vec_length_map, CR.vec_angle_deg, CR.ssim_orig, CR.ssim_deshifted, CR.ssim_improved,
File "/opt/conda/envs/arosics/lib/python3.9/site-packages/arosics/CoReg.py", line 1505, in ssim_improved
ssim_orig, ssim_deshifted = self._validate_ssim_improvement()
File "/opt/conda/envs/arosics/lib/python3.9/site-packages/arosics/CoReg.py", line 1424, in _validate_ssim_improvement
self.ssim_orig = ssim(normalize(np.ma.masked_equal(self.matchWin[:],
File "/opt/conda/envs/arosics/lib/python3.9/site-packages/skimage/_shared/utils.py", line 348, in fixed_func
return func(*args, **kwargs)
File "/opt/conda/envs/arosics/lib/python3.9/site-packages/skimage/metrics/_structural_similarity.py", line 101, in structural_similarity
check_shape_equality(im1, im2)
File "/opt/conda/envs/arosics/lib/python3.9/site-packages/skimage/_shared/utils.py", line 569, in check_shape_equality
raise ValueError('Input images must have the same dimensions.')
ValueError: Input images must have the same dimensions.
"""
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "//process.py", line 355, in <module>
gis.process()
File "//process.py", line 164, in process
CRL.correct_shifts()
File "/opt/conda/envs/arosics/lib/python3.9/site-packages/arosics/CoReg_local.py", line 810, in correct_shifts
self.calculate_spatial_shifts()
File "/opt/conda/envs/arosics/lib/python3.9/site-packages/arosics/CoReg_local.py", line 480, in calculate_spatial_shifts
self._tiepoint_grid.get_CoRegPoints_table()
File "/opt/conda/envs/arosics/lib/python3.9/site-packages/arosics/Tie_Point_Grid.py", line 404, in get_CoRegPoints_table
results = results.get()
File "/opt/conda/envs/arosics/lib/python3.9/multiprocessing/pool.py", line 771, in get
raise self._value
ValueError: Input images must have the same dimensions.
ERROR conda.cli.main_run:execute(33): Subprocess for 'conda run ['python', 'process.py']' command failed. (See above for error)
Some background:
We have been analyzing this study area for some time using AROSICS without any issues and all of the datasets are very similar. This one must have been in the "goldilocks zone" to trigger this bug. My initial reaction is to think that it might be another off by one rounding issue (similar to one we had worked through in the past). I do see a FIXME in COREG::calculate_spatial_shifts on line 1578 (version 1.7.6) which looks suspicious to me:
self._validate_ssim_improvement() # FIXME uses the not updated matchWin size
Is it possible that not using the updated matchWin is what is causing that error?
Any help is appreciated and I am available to continue debugging / write the bug report with an attached dataset. Please let me know how you'd like me to proceed.
Thank you!