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
Alexander Bruy
@alexbruy

Hi. I'm trying to install arosics on Ubuntu 18.04. I have downloaded 0.9.3 archive from gitlab repository https://gitext.gfz-potsdam.de/danschef/arosics/tree/v0.9.3, extracted it and in the source directory execute make install. But despite advertised support for Python3, this command failed with the following output

$ make install
rm -fr build/
rm -fr dist/
rm -fr .eggs/
find . -name '*.egg-info' -exec rm -fr {} +
find . -name '*.egg' -exec rm -f {} +
find . -name '*.pyc' -exec rm -f {} +
find . -name '*.pyo' -exec rm -f {} +
find . -name '*~' -exec rm -f {} +
find . -name '__pycache__' -exec rm -fr {} +
## don't include 'coverage erase' lib here because clean-test is also executed during package setup and coverage is
## only a test requirement
rm -fr .tox/
rm -f .coverage
rm -fr htmlcov/
rm -fr nosetests.html
rm -fr nosetests.xml
pip install -r requirements.txt
make: pip: Command not found
Makefile:101: recipe for target 'install' failed
make: *** [install] Error 127

Ok, I looked in the Makefile and saw that it uses pip instead of pip3 and python instead if python3, chnaged all pip occurences to pip3, python to python3 and tried again. No luck

$ make install
rm -fr build/
rm -fr dist/
rm -fr .eggs/
find . -name '*.egg-info' -exec rm -fr {} +
find . -name '*.egg' -exec rm -f {} +
find . -name '*.pyc' -exec rm -f {} +
find . -name '*.pyo' -exec rm -f {} +
find . -name '*~' -exec rm -f {} +
find . -name '__pycache__' -exec rm -fr {} +
## don't include 'coverage erase' lib here because clean-test is also executed during package setup and coverage is
## only a test requirement
rm -fr .tox/
rm -f .coverage
rm -fr htmlcov/
rm -fr nosetests.html
rm -fr nosetests.xml
pip3 install -r requirements.txt
Collecting geoarray>=0.8.17 (from -r requirements.txt (line 1))
  Downloading https://files.pythonhosted.org/packages/eb/b5/b87143c311c90bfe3bf24048af0fbbc5706902202135ed4c57f14832115f/geoarray-0.8.25.tar.gz (58kB)
    100% |████████████████████████████████| 61kB 793kB/s 
    Complete output from command python setup.py egg_info:
    running egg_info
    creating pip-egg-info/geoarray.egg-info
    writing pip-egg-info/geoarray.egg-info/PKG-INFO
    writing dependency_links to pip-egg-info/geoarray.egg-info/dependency_links.txt
    writing requirements to pip-egg-info/geoarray.egg-info/requires.txt
    writing top-level names to pip-egg-info/geoarray.egg-info/top_level.txt
    writing manifest file 'pip-egg-info/geoarray.egg-info/SOURCES.txt'
    reading manifest file 'pip-egg-info/geoarray.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    warning: no previously-included files matching '__pycache__' found under directory '*'
    warning: no previously-included files matching '*.py[co]' found under directory '*'
    warning: no files found matching '*.jpg' under directory 'docs'
    writing manifest file 'pip-egg-info/geoarray.egg-info/SOURCES.txt'
    /tmp/pip-build-qhds088s/geoarray/setup.py:87: UserWarning: You need to install holoviews manually (see www.holoviews.org) if you want to use interactive plotting. It is not automatically installed.
      warnings.warn('You need to install holoviews manually (see www.holoviews.org) if you want to use interactive '
    Traceback (most recent call last):
      File "/usr/lib/python3.6/pkgutil.py", line 490, in find_loader
        spec = importlib.util.find_spec(fullname)
      File "/usr/lib/python3.6/importlib/util.py", line 88, in find_spec
        parent = __import__(parent_name, fromlist=['__path__'])
    ModuleNotFoundError: No module named 'mpl_toolkits'

    The above exception was the direct cause of the following exception:

    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-qhds088s/geoarray/setup.py", line 91, in <module>
        if not find_loader('mpl_toolkits.basemap'):
      File "/usr/lib/python3.6/pkgutil.py", line 496, in find_loader
        raise ImportError(msg.format(fullname, type(ex), ex)) from ex
    ImportError: Error while finding loader for 'mpl_toolkits.b

then iI tried to install it from PyPI using following command

pip3 install arosics

and again got error

$ pip3 install arosics
Collecting arosics
  Using cached https://files.pythonhosted.org/packages/2b/da/755b4088ee1ab1d661a7780683515d24166a2e08f250803e1594823508cd/arosics-0.9.3.tar.gz
    Complete output from command python setup.py egg_info:
    running egg_info
    creating pip-egg-info/arosics.egg-info
    writing pip-egg-info/arosics.egg-info/PKG-INFO
    writing dependency_links to pip-egg-info/arosics.egg-info/dependency_links.txt
    writing requirements to pip-egg-info/arosics.egg-info/requires.txt
    writing top-level names to pip-egg-info/arosics.egg-info/top_level.txt
    writing manifest file 'pip-egg-info/arosics.egg-info/SOURCES.txt'
    reading manifest file 'pip-egg-info/arosics.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    warning: no previously-included files matching '__pycache__' found under directory '*'
    warning: no previously-included files matching '*.py[co]' found under directory '*'
    warning: no files found matching '*.jpg' under directory 'docs'
    writing manifest file 'pip-egg-info/arosics.egg-info/SOURCES.txt'
    /tmp/pip-build-n4nsbt19/arosics/setup.py:93: UserWarning: You need to install pyfftw manually (see https://pypi.python.org/pypi/pyFFTW) for speeding up the computation. It is not automatically installed.
      warnings.warn('You need to install pyfftw manually (see https://pypi.python.org/pypi/pyFFTW) for speeding up '
    Traceback (most recent call last):
      File "/usr/lib/python3.6/pkgutil.py", line 490, in find_loader
        spec = importlib.util.find_spec(fullname)
      File "/usr/lib/python3.6/importlib/util.py", line 88, in find_spec
        parent = __import__(parent_name, fromlist=['__path__'])
    ModuleNotFoundError: No module named 'mpl_toolkits'

    The above exception was the direct cause of the following exception:

    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-n4nsbt19/arosics/setup.py", line 97, in <module>
        if not find_loader('mpl_toolkits.basemap'):
      File "/usr/lib/python3.6/pkgutil.py", line 496, in find_loader
        raise ImportError(msg.format(fullname, type(ex), ex)) from ex
    ImportError: Error while finding loader for 'mpl_toolkits.basemap' (<class 'ModuleNotFoundError'>: No module named 'mpl_toolkits')

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-n4nsbt19/arosics/
how I can install arocis? Unfortunately documentation has almost no information about installation as well as files in the repository
Daniel Scheffler
@danschef_gitlab

The installation instructions of AROSICS are documented here: http://danschef.gitext.gfz-potsdam.de/arosics/doc/installation.html.

Please note, that AROSICS depends on some packages that cause problems when installed via pip. That´s why it is strongly recommended to install AROSICS within a separate Anaconda environment using the Anaconda package manager. This way it should not be a problem to use the API and CLI on an Ubuntu system.

Erik Reed
@erikriffs_twitter

I'm just getting started with AROSICS -- this is great. Great paper and documentation. I'm filing a bug report here instead of gitlab since I'm not sure how with that enterprise instance.

The latest version of shapely (v1.7.0) is incompatible with arosics (at least when running with the CLI in global mode). I needed to downgrade to an earlier version (conda install -c conda-forge shapely=1.6.4 did the trick). Consequently running through the install commands at http://danschef.gitext.gfz-potsdam.de/arosics/doc/_sources/installation.rst.txt (without pinning the shapely version) will error out.

Daniel Scheffler
@danschef_gitlab
@erikriffs_twitter: Thanks for reporting, Erik! I filed an issue here: https://gitext.gfz-potsdam.de/danschef/arosics/issues/34. Version 0.9.6 of AROSICS now pins shapely but I will try to resolve the incompatibility soon.
Andrew Annex
@AndrewAnnex
I am trying to run arosics and ran into several issues almost immediately, also becasue the code is hosted on a non public gitlab (non potsdam users cannot make accounts) I will have to post them here
1 reply
  1. I had to manually edit py_tools_ds/environment/gdal_env.py as pyproj does not include an epsg file, I am running on macos Catalina with anaconda
1 reply
  1. by default py_tools_ds/processing/progress_mon.py raises KeyboardInterrupt??? This code seems to be directly referencing tqdm anyways so why not depend on it directly?
2 replies
Andrew Annex
@AndrewAnnex
  1. footprint polygon calculation seems to not be very robust even when using nodata values from the geotiff
1 reply
Andrew Annex
@AndrewAnnex
I am attempting to align a 1 meter per pixel image to a 6 meter per pixel image, and I attempted 500 iterations with input shifts alternating from (4, 61) and (11, 50). is there a tolerance I should set to allow the algorithm to converge? as I just get RuntimeError: No match found in the given window
1 reply
Andrew Annex
@AndrewAnnex
I had more success by using the ignore error flag on the command line and by using int8 data, my data is float32 typically
Andrew Annex
@AndrewAnnex
trying local instead of global resulted in: "File "/Users/andrew/anaconda3/envs/arosics/lib/python3.8/site-packages/py_tools_ds/geo/projection.py", line 53, in get_proj4info
assert ds or proj, "Specify at least one of the arguments 'ds' or 'proj'""
1 reply
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