Geometry

Rotate

Rotate 90 degrees

It is possible to rotate the image 90 degrees clockwise and counterclockwise with the dedicated menu. Here the rotation is done without interpolation of the pixels and it is therefore the preferred method if you want to rotate the image by a multiple of 90 degrees. This feature is also reachable through the icons rotate-acw and rotate-cw in the toolbar.

Rotate&Crop

For a rotation of another angle you have to use the Rotate&Crop tool. It allows a precise rotation and cropping that can be easily controlled.

Rotate&Crop

Rotate&Crop dialog box showing all settings.

Five interpolation algorithms are available:

  • Nearest Neighbor

  • Bilinear

  • Bicubic

  • Pixel Area Relation

  • Lanczos-4 (Default)

Lanczos-4 is the one that gives the best results. However, if you see artifacts, especially stars surrounded by black pixels, then you may want to try others. However, the button Interpolation clamping applies a clamping factor to Bicubic and Lanczos-4 interpolation in order to prevent ringing artifacts.

If you don't want the image to be cropped after rotation, then you should uncheck the crop button. However, the missing areas of the picture will be filled with black pixel.

The interest of this tool is that the rotation of the image is represented by a red frame, as illutrated in the figure below. In addition, if a selection is active, it is possible to change its size and see in real time the framing evolve.

Crop in Rotate&Crop

Rotate&Crop dialog box with a active selection. Click to enlarge the figure and see the details better.

Siril command line

rotatePi
Rotates the loaded image of an angle of 180° around its center. This is equivalent to the command "ROTATE 180" or "ROTATE -180"

Links: rotate

Siril command line

rotate degree [-nocrop] [-interp=] [-noclamp]
Rotates the loaded image by an angle of degree value. The option -nocrop can be added to avoid cropping to the image size (black borders will be added).

Note: if a selection is active, i.e. by using a command `boxselect` before `rotate`, the resulting image will be a rotated crop. In this particular case, the option -nocrop will be ignored if passed.

The pixel interpolation method can be specified with the -interp= argument followed by one of the methods in the list no[ne], ne[arest], cu[bic], la[nczos4], li[near], ar[ea]}. If none is passed, the transformation is forced to shift and a pixel-wise shift is applied to each image without any interpolation.
Clamping of the bicubic and lanczos4 interpolation methods is the default, to avoid artefacts, but can be disabled with the -noclamp argument

Mirror

It is also possible to apply a mirror transformation to the image. Either along the x axis or along the y axis. This transformation is also accessible via the buttons mirrorx and mirrory of the toolbar.

Siril command line

mirrorx [-bottomup]
Flips the loaded image about the horizontal axis. Option -bottomup will only flip it if it's not already bottom-up

Siril command line

mirrory
Flips the image about the vertical axis

Binning

The binning is a special transformation for resampling image. It computes the sum or mean of the pixels 2x2, 3x3, ... (depending of the binning factor) of the in-memory image (like the analogic binning of CCD camera).

Bin dialogbox

Binning dialog box

Siril command line

binxy coefficient [-sum]
Computes the numerical binning of the in-memory image (sum of the pixels 2x2, 3x3..., like the analogic binning of CCD camera). If the optional argument -sum is passed, then the sum of pixels is computed, while it is the average when no optional argument is provided

Resample

The resample tool allows to resize the image at the cost of an interpolation chosen from the following list:

  • Nearest Neighbor

  • Bilinear

  • Bicubic

  • Pixel Area Relation

  • Lanczos-4 (Default)

Lanczos-4 is the one that gives the best results. However, if you see artifacts, especially stars surrounded by black pixels, then you may want to try others. However, the button Interpolation clamping applies a clamping factor to Bicubic and Lanczos-4 interpolation in order to prevent ringing artifacts.

If you want to change the image ratio, then you should uncheck the Preserve Aspect Ratio button.

Resample dialogbox

Resample dialog box

Siril command line

resample { factor | -width= | -height= } [-interp=] [-noclamp]
Resamples the loaded image, either with a factor factor or for the target width or height provided by either of -width= or -height=. This is generally used to resize images, a factor of 0.5 divides size by 2.
In the graphical user interface, we can see that several interpolation algorithms are proposed.

The pixel interpolation method can be specified with the -interp= argument followed by one of the methods in the list no[ne], ne[arest], cu[bic], la[nczos4], li[near], ar[ea]}. If none is passed, the transformation is forced to shift and a pixel-wise shift is applied to each image without any interpolation.
Clamping of the bicubic and lanczos4 interpolation methods is the default, to avoid artefacts, but can be disabled with the -noclamp argument
seqresample sequencename { -scale= | -width= | -height= } [-interp=] [-prefix=]
Scales the sequence given in argument sequencename. Only selected images in the sequence are processed.

The scale factor is specified either by the -scale= argument or by setting the output width or height using the -width= or -height= options.

An interpolation method may be specified using the -interp= argument followed by one of the methods in the list ne[arest], cu[bic], la[nczos4], li[near], ar[ea]}.. Clamping is applied for cubic and lanczos interpolation.

The output sequence name starts with the prefix "scaled_" unless otherwise specified with -prefix= option