GFZ / arosics

AROSICS - Automated and Robust Open-Source Image Co-Registration Software
https://git.gfz-potsdam.de/danschef/arosics
Apache License 2.0
150 stars 28 forks source link

Problems with show_matchWin #17

Closed notprime closed 1 year ago

notprime commented 1 year ago

Description

Hello, I was trying to view the matching window in the global coregistration process, but I got the error

xml.etree.ElementTree.ParseError: mismatched tag: line 117, column 2

This also happens if I install arosics in a new conda env.

What I Did

kwargs = {'ws': (90, 90),
                 'max_iter': 10,
                 'max_shift': 10,
                 'r_b4match': 1,
                 's_b4match': 1}

CR = COREG(im_ref, im_target)
CR.calculate_spatial_shifts()
CR.show_matchWin(interactive = True)

This is the error I get:

/davinci-1/home/rmusto/.conda/envs/hs_env/lib/python3.8/site-packages/arosics/CoReg.py:603: UserWarning: The reference image needs to be resampled because it has a row/column rotation in its map info which is not handled by AROSICS.

  warnings.warn(msg % 'reference')

Warping progress     |==================================================| 100.0% Complete  => 0:00:00

Polygonize progress     |==================================================| 100.0% Complete  => 0:00:00

Polygonize progress     |==================================================| 100.0% Complete  => 0:00:00

Automatically detected nodata value for GeoArray 'ang20210604t105418_rfl_v2z1_img_30_LR': 0.0

Calculating footprint polygon and actual data corner coordinates for reference image...

Bounding box of calculated footprint for reference image:

              (667329.3790985619, 4739906.333891552, 670839.3970653116, 4748216.376428216)

Automatically detected nodata value for GeoArray_CoReg 'Buff_PRS_L2D_Grosseto_20210604_no_water': 0.0

Calculating footprint polygon and actual data corner coordinates for image to be shifted...

Bounding box of calculated footprint for image to be shifted:

              (662232.4816017151, 4734827.5, 675882.4816017151, 4753367.5)

Matching window position (X,Y): 669087.9809501803/4744118.364043721

Target window size (256, 256) not possible due to too small overlap area or window position too close to an image edge. New matching window size: (110, 110).

Detected integer shifts (X/Y):                            0/5

Detected subpixel shifts (X/Y):                           -0.2323904673795233/-0.4139752813789888

Calculated total shifts in fft pixel units (X/Y):         -0.2323904673795233/4.586024718621011

Calculated total shifts in reference pixel units (X/Y):   -0.2323904673795233/4.586024718621011

Calculated total shifts in target pixel units (X/Y):      -0.2323916569240656/4.5860481932528945

Calculated map shifts (X,Y):                                                    -6.971749707707204/-137.58144579734653

Calculated absolute shift vector length in map units:     137.7579744395043

Calculated angle of shift vector in degrees from North:   2.900903180277764

Original map info: ['UTM', 1.0, 1.0, 662232.4816017151, 4753367.5, 30.0, 30.0, 32, 'North', 'WGS-84']

Updated map info:  ['UTM', 1.0, 1.0, '662225.5098520074', '4753229.918554203', 30.0, 30.0, 32, 'North', 'WGS-84']

Image similarity within the matching window (SSIM before/after correction): 0.4039 => 0.6165

Estimated reliability of the calculated shifts:  75.9 %

WARNING:param.main: Calling the .opts method with options broken down by options group (i.e. separate plot, style and norm groups) is deprecated. Use the .options method converting to the simplified format instead or use hv.opts.apply_groups for backward compatibility.

WARNING:param.main: Calling the .opts method with options broken down by options group (i.e. separate plot, style and norm groups) is deprecated. Use the .options method converting to the simplified format instead or use hv.opts.apply_groups for backward compatibility.

WARNING:param.main: Calling the .opts method with options broken down by options group (i.e. separate plot, style and norm groups) is deprecated. Use the .options method converting to the simplified format instead or use hv.opts.apply_groups for backward compatibility.

WARNING:param.main: Calling the .opts method with options broken down by options group (i.e. separate plot, style and norm groups) is deprecated. Use the .options method converting to the simplified format instead or use hv.opts.apply_groups for backward compatibility.

WARNING:param.main: Calling the .opts method with options broken down by options group (i.e. separate plot, style and norm groups) is deprecated. Use the .options method converting to the simplified format instead or use hv.opts.apply_groups for backward compatibility.

Matching window before and after correction (above and below):

In particular, when the message Matching window before and after correction (above and below) is displayed, the logos of Matplotlib and Holoviews are shown, but no figure is displayed.

danschef commented 1 year ago

See https://github.com/GFZ/arosics/issues/16#issuecomment-1422990572. The issue might be your old Python version.

danschef commented 1 year ago

I close this now due to inactivity. Feel free to reopen if the issue persists with a fresh installation of arosics.