Skip to content

Bin and Scale ​

Step: Linear

Changes the size of the image in pixels. Binning averages blocks of 2 × 2 or 3 × 3 pixels into one: the image gets smaller and its noise drops. Scale resamples the image by any factor, up or down.

Parameters ​

ParameterRangeDefaultUsed byEffect
MethodBin 2×2, Bin 3×3, ScaleBin 2×2allBin 2×2 and Bin 3×3 replace each block of pixels by its mean. Scale resamples by the factor below.
Factor (Scale only)0.1…40.5ScaleSize of the result relative to the original. 0.5 halves width and height, 2 doubles them.
Interpolation (Scale only)Bilinear, LanczosBilinearScaleBilinear blends the four nearest pixels: fast and smooth. Lanczos uses a wider neighborhood: sharper, but it can ring a little around very bright stars.

The factor and the interpolation are ignored by the two binning methods.

When to bin, when to scale ​

Bin when the image is oversampled, that is, when stars are spread over many pixels because the pixels are small compared to the blur of the sky and the optics. Binning gives up resolution you cannot see anyway and buys less noise: averaging four pixels (2 × 2) halves the noise, nine pixels (3 × 3) cuts it to a third. It is also the way to make a very large image easier to work with. Binning never invents or shifts anything; every output pixel is a plain average of pixels that were there.

Scale when you need a specific size, for example to enlarge a detail for a print or to bring two images to the same scale. Scaling up cannot add detail, it only spreads what is there over more pixels. Scaling down with a factor close to 1 is a fine adjustment; for halving or thirding, binning is the cleaner choice.

How it works ​

Binning results in an image of ⌈width ÷ n⌉ × ⌈height ÷ n⌉ pixels. If the width or height is not a multiple of the block size, the blocks on the right and bottom edge are smaller and are averaged over the pixels they have. Pixels without a value are skipped when averaging; a block that has no value at all stays empty.

Scale produces an image of width × factor by height × factor pixels, rounded to whole pixels and at least 1 × 1. The centers of the pixels line up: the middle of the image stays the middle, and the border does not drift. Scaling an image without gaps never leaves gaps at the edges.

Mono and color images are handled alike, every color channel separately. The file information (exposure time, filter and so on) is kept.

An undebayered image cannot be binned or scaled: averaging neighboring pixels would mix the colors of the sensor's filter pattern. The module shows an error; run Debayer first.

Tips ​

  • Bin after stacking, on the linear image and before stretching, so the noise reduction works on real data.
  • To save disk space or speed up the other modules, bin first, then process.
  • Pick a factor of exactly 1 to get the image back unchanged, as a check.