Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add precise image warping to Mosaic plugin #1004

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

ejeschke
Copy link
Owner

@ejeschke ejeschke commented May 5, 2022

This adds an option to the Mosaic plugin to warp images precisely according to the WCS of the reference image. This option is slower than the standard rotate/flip mosaicing, but can produce more accurate mosaics, especially when there is some distortion near the edge of the field.

The same functionality was previously added to the Collage plugin.

@ejeschke
Copy link
Owner Author

ejeschke commented May 7, 2022

Left todo: tile labelling

@ejeschke
Copy link
Owner Author

labeling fixed

@ejeschke ejeschke force-pushed the enhance-mosaic-plugin branch 2 times, most recently from e9eef93 to 2a6239b Compare May 14, 2022 02:56
@ejeschke ejeschke requested a review from pllim May 14, 2022 03:01
@ejeschke
Copy link
Owner Author

@pllim, it should be in good enough shape for you to test now. I think your org has a plugin that is a subclass of this, right?

Probably there are some more things to fix or work out for backward compatibility. For example, it now creates an alpha mask in the mosaic image so that the empty space between the tiles does not show. But we might need to strip it off for saving the result mosaic? Let me know how it breaks things for you! 😸

@ejeschke ejeschke force-pushed the enhance-mosaic-plugin branch from 2a6239b to fc1d24a Compare May 17, 2022 02:42
@ejeschke
Copy link
Owner Author

Rebased

@pllim
Copy link
Collaborator

pllim commented May 18, 2022

Thanks, I'll put this in my queue to review. 😸

@ejeschke ejeschke modified the milestones: 3.4, 4.0 May 19, 2022
@ejeschke
Copy link
Owner Author

Thanks, I'll put this in my queue to review. smile_cat

Take your time. I propose to bump this forward for release 4.0 in the fall.

@ejeschke ejeschke force-pushed the enhance-mosaic-plugin branch from fc1d24a to a8e68da Compare June 30, 2022 01:38
@pllim
Copy link
Collaborator

pllim commented Aug 11, 2022

@ejeschke , sorry this slipped through. Are you still waiting for my review? Would you mind rebasing? Thanks!

@ejeschke ejeschke force-pushed the enhance-mosaic-plugin branch from a8e68da to c3ad173 Compare August 12, 2022 00:05
@ejeschke
Copy link
Owner Author

Rebased. No hurry on this one, @pllim!

@ejeschke
Copy link
Owner Author

This should still be considered a draft PR.

@pllim
Copy link
Collaborator

pllim commented Aug 22, 2022

I checked out this branch, using dev version of stginga, and dev version of wss_tools. I loaded over 300 small images. Then I used MosaicAuto plugin for this workflow: https://wss-tools.readthedocs.io/en/latest/wss_tools/quip/usage_thumbs.html

https://wss-tools.readthedocs.io/en/latest/wss_tools/quip/mosaicauto.html

I get this error:

AssertionError
Non-GUI thread (...) is executing GUI (...) code!  File ".../ginga/ginga/rv/Control.py", line 424, in error_wrap
    return method(*args, **kwargs)

  File ".../ginga/rv/plugins/Mosaic.py", line 484, in mosaic
    self.fv.assert_gui_thread()

  File ".../ginga/ginga/gw/GwMain.py", line 224, in assert_gui_thread
    assert my_id == self.gui_thread_id, \

There is no error with the same images using dev version of Ginga instead of this branch.

@ejeschke ejeschke modified the milestones: 4.0, 4.1 Aug 26, 2022
@ejeschke
Copy link
Owner Author

Kicked down the road to release 4.1

@ejeschke ejeschke force-pushed the enhance-mosaic-plugin branch from c3ad173 to 84bb5a0 Compare December 30, 2022 01:15
@ejeschke ejeschke force-pushed the enhance-mosaic-plugin branch from 84bb5a0 to d16cd5f Compare May 9, 2023 22:07
@ejeschke ejeschke changed the base branch from master to main July 12, 2023 22:11
- This adds an option to the Mosaic plugin to warp images precisely
  according to the WCS of the reference image.  This option is slower
  than the standard rotate/flip mosaicing, but can produce more
  accurate mosaics, especially when there is some distortion near the
  edge of the field

- The same functionality was previously added to the Collage plugin
@ejeschke ejeschke force-pushed the enhance-mosaic-plugin branch from d16cd5f to c5fdb8f Compare February 22, 2024 00:20
@ejeschke
Copy link
Owner Author

Rebased

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants