Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Dec 02 19:13
    GitLab | Daniel Scheffler pushed 1 commits to arosics
  • Dec 02 19:07
    GitLab | Daniel Scheffler pushed 1 commits to arosics
  • Dec 02 19:06
    GitLab | Daniel Scheffler pushed to arosics
  • Dec 02 19:02
    GitLab | Daniel Scheffler pushed 1 commits to arosics
  • Dec 02 19:01
    GitLab | Daniel Scheffler pushed 1 commits to arosics
  • Dec 02 19:01
    GitLab | Daniel Scheffler pushed to arosics
  • Dec 02 18:58
    GitLab | Daniel Scheffler pushed 1 commits to arosics
  • Dec 02 18:58
    GitLab | Daniel Scheffler pushed 2 commits to arosics
  • Dec 02 18:46
    GitLab | Daniel Scheffler pushed to arosics
  • Dec 02 18:46
    GitLab | Daniel Scheffler pushed 11 commits to arosics
  • Dec 02 18:43
    GitLab | Daniel Scheffler pushed 1 commits to arosics
  • Dec 02 18:26
    GitLab | Daniel Scheffler pushed 3 commits to arosics
  • Dec 02 16:09
    GitLab | Daniel Scheffler pushed to arosics
  • Dec 02 16:09
    GitLab | Daniel Scheffler pushed 3 commits to arosics
  • Dec 02 15:33
    GitLab | Daniel Scheffler pushed 1 commits to arosics
  • Dec 02 15:14
    GitLab | Daniel Scheffler pushed 1 commits to arosics
  • Dec 02 15:07
    GitLab | Daniel Scheffler pushed 3 commits to arosics
  • Dec 02 14:47
    GitLab | Daniel Scheffler pushed 2 commits to arosics
  • Dec 02 14:36
    GitLab | Daniel Scheffler pushed 1 commits to arosics
  • Dec 02 14:30
    GitLab | Daniel Scheffler pushed to arosics
Panji Brotoisworo
@PanjiBrotoisworo_gitlab
This message was deleted
8 replies
Panji Brotoisworo
@PanjiBrotoisworo_gitlab

Hi Daniel, I've been experimenting with Arosics and I'm wondering if it's possible to create a mosaic using this software. What I like about this compared to GeFolki is that your software shows the X/Y shift in the console so I can manually do it if necessary.

I'm trying to create a mosaic using raw ungeoreferenced satellite imagery. I define an arbitrary projection (GCS WGS 1984) and I set the coordinates to 0,0 degrees for all the test images so that Arosics can function. I haven't been having much success using the global coregistration. Very few or none of the images in some cases can be coregistered. In some cases the shift is only a few pixels. Do you think what I'm trying to do is possible using Arosics?

Here is the sample of images I'm trying to coregister and create a mosaic. The image is roughly only 500x500 big and I can only use a window size < 128.
https://giphy.com/gifs/IevI6OC7dMsa6X4nFA

4 replies
adamjson64
@adamjson64

Hi Daniel , Great work. AROSICS works great out of the box on my RGB orthophotos, but I'm having trouble with a single band reflectance map (dtype Float32). Is that expected to work?

I keep getting the following error

First attempt to check if functionality of co-registration failed. Check your input data and parameters. The following error occurred:
Traceback (most recent call last):
  File "/Users/adamjson/PycharmProjects/arosics3/test.py", line 69, in <module>
    CRL = COREG_LOCAL(geoArr_reference, geoArr_target, **kwargs)
  File "/Users/adamjson/anaconda3/envs/arosics4/lib/python3.7/site-packages/arosics/CoReg_local.py", line 256, in __init__
    ignore_errors=False)
  File "/Users/adamjson/anaconda3/envs/arosics4/lib/python3.7/site-packages/arosics/CoReg.py", line 310, in __init__
    self._get_image_params()
  File "/Users/adamjson/anaconda3/envs/arosics4/lib/python3.7/site-packages/arosics/CoReg.py", line 442, in _get_image_params
    self.ref = GeoArray_CoReg(self.params, 'ref')
  File "/Users/adamjson/anaconda3/envs/arosics4/lib/python3.7/site-packages/arosics/CoReg.py", line 122, in __init__
    if not self.footprint_poly.is_valid:
  File "/Users/adamjson/anaconda3/envs/arosics4/lib/python3.7/site-packages/geoarray/baseclasses.py", line 503, in footprint_poly
    self._footprint_poly = fill_holes_within_poly(multipolygon)
  File "/Users/adamjson/anaconda3/envs/arosics4/lib/python3.7/site-packages/py_tools_ds/geo/vector/topology.py", line 183, in fill_holes_within_poly
    largest_poly_filled = gdf.loc[gdf['area_filled'].idxmax()]['geometry']
  File "/Users/adamjson/anaconda3/envs/arosics4/lib/python3.7/site-packages/pandas/core/series.py", line 2110, in idxmax
    i = nanops.nanargmax(com.values_from_object(self), skipna=skipna)
  File "/Users/adamjson/anaconda3/envs/arosics4/lib/python3.7/site-packages/pandas/core/nanops.py", line 65, in _f
    f"reduction operation '{f_name}' not allowed for this dtype"
TypeError: reduction operation 'argmax' not allowed for this dtype

If you could point me in the right direction I'd be happy to try and fix this if it turns out to be a bug.

7 replies
TheMilkMaid
@TheMilkMaid

Hi Daniel, I'm trying to use global georeferencing with 3m resolution reference images and 0.75m target images. I often get a bug where the shift validation repeats the same shifts several times, but doesn't consider it a match:

No clear match found yet. Jumping to iteration 27...                                                                  
input shifts:  -44 38                                                                                                 
No clear match found yet. Jumping to iteration 28...                                                                  
input shifts:  -44 38                                                                                                 
No clear match found yet. Jumping to iteration 29...                                                                  
input shifts:  -44 38                                                                                                 
No clear match found yet. Jumping to iteration 30...                                                                  
input shifts:  -44 38                                                                                                 
No match found in the given window, global coregistration failed

Do you have any suggestions on how to fix this?

1 reply
yaatsn3821
@yaatsn3821

Hi Daniel, I'm trying to global coregistration.
I got Type Error in calculating actual data corner coordinates.
Input data are ALOS2(PALSAR2) image(geo-coeded and have nodata around observed data).

Calculating actual data corner coordinates for reference image...
Automatically detected nodata value for GeoArray_CoReg 'IN_MEM': 0.0
Polygonize progress     |==================================================| 100.0% Complete  => 0:00:08
Traceback (most recent call last):
  File "****", line 158, in <module>
    createRGBCompositeImage(args.before, args.after, args.fpath_out)
  File "****", line 129, in createRGBCompositeImage
    CR = COREG(geoArr_after, geoArr_before, max_shift=20, q=False)
  File "/export_afenfs_high-speed/product/mlt_test/morita/anaconda3/envs/arosics3/lib/python3.7/site-packages/arosics/CoReg.py", line 310, in __init__
    self._get_image_params()
  File "/export_afenfs_high-speed/product/mlt_test/morita/anaconda3/envs/arosics3/lib/python3.7/site-packages/arosics/CoReg.py", line 442, in _get_image_params
    self.ref = GeoArray_CoReg(self.params, 'ref')
  File "/export_afenfs_high-speed/product/mlt_test/morita/anaconda3/envs/arosics3/lib/python3.7/site-packages/arosics/CoReg.py", line 122, in __init__
    if not self.footprint_poly.is_valid:
  File "/export_afenfs_high-speed/product/mlt_test/morita/anaconda3/envs/arosics3/lib/python3.7/site-packages/geoarray/baseclasses.py", line 501, in footprint_poly
    self._footprint_poly = fill_holes_within_poly(multipolygon)
  File "/export_afenfs_high-speed/product/mlt_test/morita/anaconda3/envs/arosics3/lib/python3.7/site-packages/py_tools_ds/geo/vector/topology.py", line 184, in fill_holes_within_poly
    largest_poly_filled = gdf.loc[gdf['area_filled'].idxmax()]['geometry']
  File "/export_afenfs_high-speed/product/mlt_test/morita/anaconda3/envs/arosics3/lib/python3.7/site-packages/pandas/core/series.py", line 2168, in idxmax
    i = nanops.nanargmax(self._values, skipna=skipna)
  File "/export_afenfs_high-speed/product/mlt_test/morita/anaconda3/envs/arosics3/lib/python3.7/site-packages/pandas/core/nanops.py", line 67, in _f
    f"reduction operation '{f_name}' not allowed for this dtype"
TypeError: reduction operation 'argmax' not allowed for this dtype

gdf['geometry'] has no element,this caused this error.
So,

gdf['geometry'] = poly

to

gdf['geometry'] = [ p for p in poly]

it seems OK.Do you have any suggestions on how to fix this?

3 replies
George Petrakis
@Gpetrak

Hi Daniel, I'm trying to fuse spatio-temporal data from Landsat-8 and Modis and I use Arosics for co-registration. The pre-processing steps that I follow before using Arosics are the following. At first I crop the images in the same extent and georeference Modis image in the same projection as Landsat. After that, I resample Modis image from 500 pixel size to 30 pixel size. In this point I use the command:

python arosics_cli.py global modis_image.tif landsat_image.tif

but it raises the following error:

Calculating actual data corner coordinates for reference image...
Bounding box of calculated footprint for reference image:
    (280335.0, 3862485.0, 358545.0, 3925665.0)
Calculating actual data corner coordinates for image to be shifted...
/home/server/anaconda3/envs/fusion/lib/python3.7/site-packages/geoarray/baseclasses.py:377: UserWarning: Nodata value could not be clearly identified. It has been set to None.
  warnings.warn('Nodata value could not be clearly identified. It has been set to None.')
Bounding box of calculated footprint for image to be shifted:
    (280316.1072693282, 3862498.4168893998, 358526.1072693282, 3925678.4168893998)
Matching window position (X,Y): 319430.5536346641/3894081.7084447
No clear match found yet. Jumping to iteration 2...
input shifts:  -18 37
No clear match found yet. Jumping to iteration 3...
input shifts:  35 -1
No clear match found yet. Jumping to iteration 4...
input shifts:  18 0
No clear match found yet. Jumping to iteration 5...
input shifts:  -57 -21
Traceback (most recent call last):
  File "/home/server/anaconda3/envs/fusion/bin/arosics_cli.py", line 362, in <module>
    parsed_args.func(parsed_args)
  File "/home/server/anaconda3/envs/fusion/bin/arosics_cli.py", line 68, in run_global_coreg
    COREG_obj.correct_shifts()
  File "/home/server/anaconda3/envs/fusion/lib/python3.7/site-packages/arosics/CoReg.py", line 1426, in correct_shifts
    DS = DESHIFTER(self.shift, self.coreg_info,
  File "/home/server/anaconda3/envs/fusion/lib/python3.7/site-packages/arosics/CoReg.py", line 1383, in coreg_info
    self.calculate_spatial_shifts()
  File "/home/server/anaconda3/envs/fusion/lib/python3.7/site-packages/arosics/CoReg.py", line 1296, in calculate_spatial_shifts
    self._handle_error(RuntimeError('No match found in the given window.'))
  File "/home/server/anaconda3/envs/fusion/lib/python3.7/site-packages/arosics/CoReg.py", line 359, in _handle_error
    raise error
RuntimeError: No match found in the given window.

When I try to run the above command on the raw data, it runs successfully.
Could you help me with that issue ?
Thank you in advance !

2 replies
Panji Brotoisworo
@PanjiBrotoisworo_gitlab

Hello, I think I discovered a bug using AROSICS v1.0.3. When I use COREG_LOCAL for geometric correction with q=True or v=False it still prints statements related to tie point filtering. I think the problem is due to instantiation of the Tie_Point_Grid object in CoReg_local.py in line 339.
I see that there is an input for q but it is not being followed because Tie_Point_Refiner in Tie_Point_Grid.py line 416 only uses keyword arguments from outlDetect_settings from CoReg_local.py line 339 to instantiate the object but it does not include the q parameter.

I managed to suppress the print statement properly by adding the q parameter inside outlDetect_settings dict parameter in line 339 Tie_Point_Grid instantiation.

1 reply
ramotswa
@ramotswa

Hi all - Just stumbled over Arosics and am keen to see if it can help with my reqs - so to start off; should I be able to co-register two PNG files from an aerial survey? No geospatial info available but the docs do say this should be possible. I tried the CLI first with;

python3 bin_arosics_cli.py local 20201030-154404024.tif_despeckle.png 20201030-154404665.tif_despeckle.png 50

but I get;

Calculating actual data corner coordinates for reference image...
Shell is not a LinearRing
bin_arosics_cli.py:362: UserWarning:
First attempt to check if functionality of co-registration failed. Check your input data and parameters. The following error occurred:
  parsed_args.func(parsed_args)
Traceback (most recent call last):
  File "bin_arosics_cli.py", line 362, in <module>
    parsed_args.func(parsed_args)
  File "bin_arosics_cli.py", line 73, in run_local_coreg
    CRL = COREG_LOCAL(args.path_ref,
  File "/usr/local/lib/python3.8/site-packages/arosics/CoReg_local.py", line 233, in __init__
    self.COREG_obj = COREG(self.imref, self.im2shift,
  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 117, in __init__
    _ = self.footprint_poly  # execute getter
  File "/usr/local/lib/python3.8/site-packages/geoarray/baseclasses.py", line 482, in footprint_poly
    self._footprint_poly = self.box.mapPoly
  File "/usr/local/lib/python3.8/site-packages/geoarray/baseclasses.py", line 340, in box
    mapPoly = get_footprint_polygon(get_corner_coordinates(gt=self.geotransform, cols=self.columns, rows=self.rows))
  File "/usr/local/lib/python3.8/site-packages/py_tools_ds/geo/vector/topology.py", line 89, in get_footprint_polygon
    assert outpoly.is_valid, 'The given coordinates result in an invalid polygon. Check coordinate order.' \
  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
3 replies
Richard Anthony Fernandes
@rfernand387
Hi. Question about best practice using COREG.local. Trying to register a WV3 image to a S2 MSI image over mixed land use. The WV3 is 22deg off nadir so global coreg fails, hence local. My question is if a WV3 image should be smoothed (but not resampled ) using the MSI Point spread function. Reason is that AROSICS seems to resample and then do matching based on power spectrum. Without filtering WV3 power spectrym will have high frequencies not in MSI and impact some matches. I tried with and without filtering WV3 and get more matches without but perhaps also more noisy matches (images below) - which is preffereable? Richard Fernandes, Canada Centre for Remote Sensing a) PSF applied b) no psf applied image.png
1 reply
image.png
ramotswa
@ramotswa
Hi Daniel, thanks for the response. I am going through this again and am trying a super simple example. Using two PNG's that are very close already I'm just trying to run Arosics; CR = COREG(im_reference, im_target, calc_corners=false, ws=(256,256))
Putting it here as I can't past images into our thread;
2021-03-02_21-25-41_0_frame_205.png
2021-03-02_21-25-41_0_frame_214.png
Those are my two images. I know they have a pixel shift of about 4-5 pixels (just from visual guessing) so was hoping arosics would be able to cope with that
But still getting
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
6 replies
Daniel Scheffler
@danschef_gitlab
Hi all, it is now also possible to file issues directly in the AROSICS issue tracker (https://git.gfz-potsdam.de/danschef/arosics/-/issues) by logging in via your GitHub credentials. This may help to keep the overview, link issues, and so on.
adamjson64
@adamjson64

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!

20 replies
Andres Garcia
@garciamma_gitlab

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!

1 reply
Firman Hadi
@firmanhadi

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.

Screenshot from 2021-06-08 06-45-18.png

Screenshot from 2021-06-08 06-45-47.png

2 replies
Firman Hadi
@firmanhadi:matrix.org
[m]
Daniel Scheffler
@danschef_gitlab
Well, as the error message says, you have to make sure that your target image and the mask for your target image have the same geometry (origin coordinate, pixel size, projection).
Firman Hadi
@firmanhadi
Dear Daniel, thank you very much. In that case, I have to go back to basic, preparing the images with GRASS GIS :D.
SoutoPaola
@SoutoPaola
Hi Daniel! I'm trying to co-registrate the bands of an hyperspectral image with the panchromatic band of the same satellite but from another date. I'm trying to use the Global mode and everything works. The problem is the co-registered image now have negative values. From my understanding, this is caused by the warping cubic interpolation. In the article I have read that the warping process can be avoided maintaining the original values of the image to be co-registrated. The problem is that I don't found how to avoid such process. How can I do? Have I understand something wrong? Many thanks in advance
2 replies
Ghiz
@ghizlan.astaoui_gitlab
Hello Daniel! Thanks for the Arosics package I just started using it for my remote sensing projects and happened to run into a problem recently when wanting to coregister two arrays using Geoarray after defining the projection system as explained in this part of the documentation (https://danschef.git-pages.gfz-potsdam.de/arosics/doc/usage/local_coreg.html#detect-and-correct-local-shifts-without-any-disk-access) I'm trying to run a local coregistration using arosics version : 1.4.6
1 reply
image.png
Thanks in advance
neha
@gm_nehagaur_twitter
Hi, i have succefully installed arosics package, but it is giving problem for some geotiffs, the error is "reduction operation 'argmax' not allowed for this dtype" what can be the problem? and how to resolve it!! Please reply
1 reply
neha
@gm_nehagaur_twitter
Hi I am using arosics version 0.9.18, what are the issues in that? and how to upgrade this to latest version? do i need to again reinstall it?
1 reply
Panji Brotoisworo
@PanjiBrotoisworo_gitlab
Hello, I'm wondering if there is a suggested way to automatically calculate the performance of COREG_LOCAL. My current method is to run COREG_LOCAL then apply the spatial shifts. Then to calculate the performance of coregistration I run COREG_LOCAL again to get the RMSE of local shifts from the tie point grid (but I do not apply spatial shifts). However, I saw that AROSICS also uses SSIM to calculate some stuff and I wonder if this can be used to automatically check the performance of the image coregistration.
2 replies
nicgar20
@nicgar20
Hi, I would like to ask if there is a way for me to use AROSICS to coregister 2 numpy arrays with an identity affine transformation and no coordinate system (Raw SAR images, for instance). Thank you very much in advance.
2 replies
adamjson64
@adamjson64

Hello @danschef_gitlab. Do you have any recommendations on tuning AROSICS for an irregularly shaped raster?

coreg-result.png

7 replies
Azka Ramzan
@AzkaRamzan_twitter
capture.png
Hi @danschef_gitlab, I tried to coregister images with COREG_LOCAL but ran into a problem. How can I stop this error? Please suggest something.
3 replies
Kathleen Kanaley
@kkanaley
Screen Shot 2022-07-05 at 11.25.55.png
Hi @danschef_gitlab . I am running arosics global with two 8-band images and I got the error shown above. Any idea how to troubleshoot?
1 reply
adamjson64
@adamjson64

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!

1 reply