[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnuastro-devel] [task #14363] Option for scaling to nearest full pixel
From: |
Mohammad Akhlaghi |
Subject: |
[gnuastro-devel] [task #14363] Option for scaling to nearest full pixel fraction |
Date: |
Mon, 13 Feb 2017 18:31:25 -0500 (EST) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:51.0) Gecko/20100101 Firefox/51.0 |
Follow-up Comment #8, task #14363 (project gnuastro):
Warp (the new name for ImageWarp) now comes with
<https://gitlab.com/makhlaghi/gnuastro/commit/0e344fe55b> the new option
`--coveredfrac' (replacing the old `--maxblankfrac' function, see P.S.), which
can address the problem you mentioned about a flat image.
What this option does is this: you give it a fraction (between 0 and 1). If
the output pixel doesn't cover the input pixels by a fraction larger than the
number you gave, the output pixel will be blank.
So, to ensure flat-ness in your example, you can run Warp with
`--coveredfrac=1'. In this way, if the output pixel isn't fully covered by the
input image pixels, it will have no value, so all your output pixels will also
be flat. This comes at the expense of missing the pixels immediately touching
the edge, so the total sum of the pixel values will be less than the input
image. But you do have access to a continuous warping space.
The great thing with this feature is that it doesn't just apply to `--scale',
it applies to any kind of warping.
This isn't a solution to this task, but I am just mentioning it here as one
alternative that can be used until this task is implemented.
P.S. the old `--maxblankfrac' just counted the fraction of blank pixels over
the output image, so it was useless for edge effects. The new `--coveredfrac'
now accounts for both blank pixels and edges of the image.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/task/?14363>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [gnuastro-devel] [task #14363] Change the default behaviour of --scale in ImageWarp, Lee Kelvin, 2017/02/08
- [gnuastro-devel] [task #14363] Change the default behaviour of --scale in ImageWarp, Mohammad Akhlaghi, 2017/02/08
- [gnuastro-devel] [task #14363] Change the default behaviour of --scale in ImageWarp, Lee Kelvin, 2017/02/09
- [gnuastro-devel] [task #14363] Change the default behaviour of --scale in ImageWarp, Mohammad Akhlaghi, 2017/02/09
- [gnuastro-devel] [task #14363] Change the default behaviour of --scale in ImageWarp, Mohammad Akhlaghi, 2017/02/09
- [gnuastro-devel] [task #14363] Change the default behaviour of --scale in ImageWarp, Lee Kelvin, 2017/02/10
- [gnuastro-devel] [task #14363] Option for scaling to nearest full pixel fraction, Mohammad Akhlaghi, 2017/02/10
- [gnuastro-devel] [task #14363] Option for scaling to nearest full pixel fraction, Mohammad Akhlaghi, 2017/02/10
- [gnuastro-devel] [task #14363] Option for scaling to nearest full pixel fraction,
Mohammad Akhlaghi <=