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
Richard Anthony Fernandes
@rfernand387
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