PixInsight 1.5

The Officially Unofficial Reference Guide

Rev.0.1 – 3/29/2010

Section 7: Geometry

ChannelMatch

ChannelMatch is intended to align individual RGB channels in a color image by means of entering the offset values between channels.

RGB: Select/deselect the channels to be aligned.

X-Offset / Y-Offset: Defines the x/y coordinates offset for the given channel. Integer numbers will result in a pixel-by-pixel operation, while if non-integer values are indicated, ChannelMatch will perform sub-pixel translations (interpolation). Whenever possible, interpolation should be avoided, especially at initial processing stages.

Linear Correction Factors: Assign a linear (multiplicative) correction factor to each channel. A value of 1 will not apply any correction.

Crop

Crop is used to perform a static crop to an image, with detailed precision. To perform a more visually defined crop (i.e. using the mouse over the image), use the DynamicCrop module.

Before performing the crop is desirable to select the view where we will be performing the crop, using the view selector (by default indicating <No View Selected>).

Margins/Anchors

You can enter the margins for the crop in the provided boxes. To define a margin to the left, enter the amount in the left box. To define a margin on the top, enter the amount on the top box, etc. Then you can choose one between nine anchors, and the arrow icons will change to indicate how margins will be distributed on each side of the image.

Dimensions

Height/Width: Use any of these boxes (different measurement units provided) to indicate the dimensions of the cropped area.

Resolution

Horizontal/Vertical: Define the horizontal and vertical resolution of the target image in pixels per inch/cm (see below).

Centimeters/Inches: Select centimeters if the resolution entered in the Horizontal and Vertical dimension parameters is in centimeters. Select inches if it's in inches.

Force Resolution: When selected, this option also changes the resolution and resolution unit of the target image.

Process Mode

Crop Mode: Four options are available:

Fill Color

When the cropped image requires expansion beyond the limits of the source image– that is, we indicated dimensions that cover an area that does not exist in the source image, new pixels are added at the corresponding sides with the color specified in this section (RGB and Alpha values).

DynamicCrop

Many times, static crop and rotation procedures are not well suited to a particular image, because both geometrical transforms should be defined in a single operation or none of them would make sense. The DynamicCrop process facilitates a simultaneous crop and rotation mechanism in a highly interactive way.

Because the Dynamic Crop/Rotate dialog is not an abstract interface (because it needs an image window to work), you cannot drag the “new instance” icon over to an image. All you need to do to perform a Dynamic Crop is to open the dialog, define the area to crop with the mouse over the target image, rotate the crop area if desired, and execute (green check mark). The “new instance” icon is there in case you want to instantiate DynamicCrop, that is, create a process icon with this dialog.

When the area has been defined, the parameters in the DynamicCrop process window will be updated accordingly, and you can edit them manually if you wish.

Size/Position

Width/Height: Define the width and height of the cropped area.

Anchor X/Anchor Y: Define the anchor point in (x,y) coordinates of the cropped area.

Rotation

Angle: Define the angle of the cropped area, in degrees. An angle of zero degrees means no rotation. You can also use the circle icon to “draw” the angle, rather than entering it in degrees in the Angle text box.

Clockwise: When checked, the rotation is performed clockwise at the the angle specified above. When unchecked, the rotation is assumed to be counter-clockwise.

Center X/Y: The center coordinates for the rotation.

Optimize fast rotations: Fast rotations are rotations of 180 and 90 degrees (clockwise and counter-clockwise). When this option is checked, if a fast rotation is done, the rotation is calculated by swapping and copying pixels between memory locations without floating point operations, which, because it is not needed in this case, it results in no data degradation but at the same time it is extremely fast.

Scale

Scale X/Y: Once cropped, the area can be rescaled if you like. The X/Y values determine the scale for the resulting crop image. A value of 1 means the original scale is preserved. A value of 2 for example, will double the scale in that axis.

W/H: Same as above except that in this case we determine the scale based on the final width and height size of the cropped area.

Interpolation

Algorithm: Usually it's best to leave it as “Auto” unless you have a special reason to force PixInsight to use one of the available algorithms.

In the Auto mode, Bicubic spline is always used for upsampling scaling ratios, and also for slight downsampling ratios, when the Mitchell-Netravali filters cannot be properly sampled (filter kernels smaller than 5x5 elements). Mitchell-Netravali cubic filters are used for the rest of downsampling operations.

If you don't select the Auto mode, it may be useful to know that when downscaling an image, the nearest neighbor and bilinear algorithms tend to be the poorest performers, followed by the bicubic spline and bicubic B-spline algorithms, with the Mitchell-Netravali and Catmull-Rom algorithms often providing very good results.

When upscaling an image, bicubic spline usually gives the best results. The Mitchell-Netravali interpolation filter can be used to achieve higher smoothness in the upsampled result, which can be desirable in some applications

Smooth: This parameter is only available if the Mitchell-Netravali, Catmull-Rom Spline or Cubic B-Spline algorithm has been selected.

Fill Color

When the cropped image requires expansion beyond the limits of the source image– that is, we indicated dimensions that cover an area that does not exist in the source image, new pixels are added at the corresponding sides with the color specified in this section (RGB and Alpha values).

FastRotation

Fast rotations are rotations of 180 and 90 degrees (clockwise and counter-clockwise) and horizontal/vertical mirror swaps. They differ from rotations at other angles because the rotation can be calculated by swapping and copying pixels between memory locations without floating point operations (because it is not needed in this case), which results in no data degradation but at the same time it is extremely fast.

The options in this dialog are sufficiently self-explanatory: Rotate 180 degrees, 90 clockwise, 90 counter-clockwise, horizontal and vertical mirrors.


IntegerResample

IntegerResample resizes images by integer factors. The selected image in the view selection list at the top is used just to give an example of how its dimensions would change, not to actually apply the process to it necessarily. While it's useful to enter there the image we're planning to resample, so that its dimensions are placed in the right boxes, you can manually define all the parameters if you like.

Integer Resample

Resample Factor: The scaling factor.

Downsample: Reduce the target image size by the resample factor.

Upsample: Increase the target image by the resample factor

Downsample mode: When downsampling, you can indicate whether the resampling algorithm will calculate the resampled pixels from the average, median, maximum or minimum values of the group of pixels being downsampled.

Dimensions

Width/Height: If you select an image/view in the view selection list at the top, the Original px values will be populated with the width and height of the image. You can however introduce your own values if you like. The rest of the values in this section (Target px, cm and inch) will indicate the final size of the image (in pixels, centimeters and inches respectively) based on the original px values, the resample factor and whether you selected downsample or upsample.

Resolution

Horizontal/Vertical: Define the horizontal and vertical resolution of the target image in pixels per inch/cm (see below).

Centimeters/Inches: Select centimeters if the resolution entered in the Horizontal and Vertical dimension parameters is in centimeters. Select inches if it's in inches.

Force Resolution: When selected, this option also changes the resolution and resolution unit of the target image.

Resample

The Resample process implements a general but sophisticated resampling procedure in PixInsight: given a source image, Resample generates a target image of the specified dimensions, with the help of a pixel interpolation algorithm. In addition, you can specify the image resolution in pixels and a corresponding resolution unit in the same resampling process, just for convenience.

Just like with the IntegerResample process, the selected image in the view selection list at the top is used just to give an example of how its dimensions would change, not to actually apply the process to it necessarily. Again, while it's useful to enter there the image we're planning to resample, so that its dimensions are placed in the right boxes, you can manually define all the parameters if you like.

Dimensions

The Dimensions panel is where you can inspect and modify image dimensions in pixels, centimeters and inches. You can also specify relative sizes as percentages of actual target image dimensions.

Width/Height: If you select an image/view in the view selection list at the top, the Original px values will be populated with the width and height of the image. You can however introduce your own values if you like.

The rest of the values in this section (Target px, %, cm and inch) is where you define the dimensions of the target image, and you can do that either in pixels, percentage, centimeters or inches, whichever is convenient for you.

Preserve Aspect Ratio: When enabled, if you enter an amount in the any of the three (px, cm or inch) Target width boxes, the height values will be automatically updated to maintain a final image that has the same aspect ratio as the source. Likewise, if you enter a value in any of the target height boxes, the width boxes will be automatically updated to maintain a final image of the same aspect ratio as the source image.

Algorithm: Usually it's best to leave it as “Auto” unless you have a special reason to force PixInsight to use one of the available algorithms.

Smoothness: This parameter is only available if the Mitchell-Netravali, Catmull-Rom Spline or Cubic B-Spline algorithm has been selected.

Resolution

Horizontal/Vertical: Define the horizontal and vertical resolution of the target image in pixels per inch/cm (see below).

Centimeters/Inches: Select centimeters if the resolution entered in the Horizontal and Vertical dimension parameters is in centimeters. Select inches if it's in inches.

Force Resolution: When selected, this option also changes the resolution and resolution unit of the target image. To define a Resample instance to set resolution parameters only, without actually resampling pixels, select this option and the Relative Resize mode, with both percentual dimensions at 100%.

Process Mode

Resample Mode: The resampling operation is quite simple by itself, but the precise interpretation of resampling parameters is not obvious. You have the following possibilities to define how to apply a resampling operation:

Rotation

The Rotation process is used to rotate an image/view.

Rotation

Angle: Define the angle of the cropped area, in degrees. An angle of zero degrees means no rotation. You can also use the circle icon to “draw” the angle, rather than entering it in degrees in the Angle box.

Clockwise: When checked, the rotation is performed clockwise at the the angle specified above. When unchecked, the rotation is assumed to be counter-clockwise.

Optimize fast rotations: Fast rotations are rotations of 180 and 90 degrees (clockwise and counter-clockwise). When this option is checked, if a fast rotation is done, the rotation is calculated by swapping and copying pixels between memory locations without floating point operations, which, because it is not needed in this case, it results in no data degradation but at the same time it is extremely fast.

Interpolation

Algorithm: Usually it's best to leave it as “Auto” unless you have a special reason to force PixInsight to use one of the available algorithms.

Smoothness: This parameter is only available if the Mitchell-Netravali, Catmull-Rom Spline or Cubic B-Spline algorithm has been selected.

Fill Color

When the cropped image requires expansion beyond the limits of the source image– that is, we indicated dimensions that cover an area that does not exist in the source image, new pixels are added at the corresponding sides with the color specified in this section (RGB and Alpha values).

Back to the Index | Copyright Note