Image Types and Filters

Image Types and Filters

Image Types and Filters

Canvas X Draw supports 8-bit and 16-bit images. All image filters are available for 8-bit images. For Binary filters, the 8-bit image must be grayscale. (See Binary Filters.)

Regarding 16-bit images, various image filters and adjustment commands are available. (See Available filters and adjustment commands.)

Image Modes

If you are working with various image types and need to determine or convert images, choose Image | Mode.

  • 8 Bits/Channel: Indicates an 8-bit image. If working with 16-bit, select this option to convert to an 8-bit image.
  • 16 Bits/Channel: Indicates a 16-bit image. Select this option to convert to a 16-bit image if working with another image type.

The following table indicates the filters that can be used with 16-bit images:

Image type

Available filters and adjustment commands

16-bit

Average blur, Gaussian blur, Add Noise, Despeckle, Dust & Scratches, Median, High Pass, Maximum, Minimum, Arithmetic, Binary Logic, Image Math, Invert, Levels, Curves, Brightness/Contrast, Hue/Saturation (RGB only), Color Balance (RGB only)

Binary Filters

These commands can be applied to 8-bit grayscale images. For the Dilate, Erode, Open, and Close commands, you must specify the number of iterations in a dialog box. Iterations refer to the number of repetitions of a chosen filter.

Dilate

The Dilate command enlarges objects that are darker than the background adding pixels to the edges of black objects.

Original image

Image with Dilate filter applied

Erode

The Erode command reduces the size of objects that are darker than the background.

Original image

Image with Erode filter applied

Make Binary

The Make Binary command converts a grayscale image, or the current selection, to values of either 0 or 255 so that you can apply a binary command to the image.

Close

The Close command is a combination of the Dilate and Erode commands. When selected, the filter first performs a dilation and then the erosion. The goal of the filter is to smooth objects by filling in gaps in the image.

Original image

Image with Close filter applied

Open

The Open filter, a combination of the Erode and Dilate commands, is used to smooth objects and eliminate isolated pixels. When applied, the Erode filter is first performed, followed by the Dilate command.

Original image

Image with Open filter applied

Outline

Select this command and all black objects will be represented by a one-pixel wide outline.

Original image

Image with Outline filter applied

Skeletonize

When this command is applied to 8-bit grayscale images, pixels are removed from the edges of objects until the edges consist of single pixel-wide skeletons.

Original image

Image with Skeletonize filter applied

Distance Map

When applied, this filter creates an Euclidean distance map (EDM). The result of the command is that every black pixel is replaced with a gray value that is equivalent to the black pixel’s distance from the closest white pixel.

Original image

Image with Distance Map filter applied

Ultimate Points

This filter is used on images to which the Distance Map filter has been applied to find the Ultimate Eroded Points (UEPs) of the Distance Map.

Image with Distance Map filter applied

Image with Ultimate Point filter applied

Scientific filters

Canvas X Draw features scientific filters that can be used to analyze 8-bit and 16-bit images. See Available filters and adjustment commands to verify which scientific filter is available for the various image types.

To Access the Scientific Filters:

Choose Image | Filter | Scientific.

Arithmetic

The Arithmetic Filter contains commands that add (subtract, multiply, etc.) a value to each pixel in the active image or selection. When the result value is above or below the legal range of the image's data type, the value is reset to the maximum/minimum value.

To Apply an Arithmetic Filter:

  1. Select the image object (or part of it with a Marquee or Lasso tool) or place it in Edit mode.
  2. Choose Image | Filter | Scientific | Arithmetic.
  3. In the Arithmetic Filter dialog box, select the Operation drop-down menu to choose a command.
  4. Select the Preview checkbox so you can see the result before clicking OK.

  5. Enter a value in the Value numeric field.
  6. Click OK.

The Operation drop-down menu contains the following commands:

Operation

Explanation

Add

Adds a value to the image. With 8-bit images, results greater than 255 are set to 255.

Subtract

Subtracts a value from the image. With 8-bit and 16-bit images, results less than 0 are set to 0.

Multiply

Multiplies the image by the specified real value. With 8-bit images, results greater than 255 are set to 255. With 16-bit signed images, results greater than 65,535 are set to 65,535.

Divide

Divides the image by the specified real value. Attempts to divide by zero will be ignored.

Minimum

Pixels in the image with a value less than the specified value are replaced by the value.

Maximum

Pixels in the image with a value greater than the specified constant are replaced by the value.

Square root

Destination pixel is equal to the square root of source pixel.

Square

Destination pixel is equal to the square of source pixel.

Gamma

Applies the function f(p) = (p/255)^gamma*255 to each pixel (p) in the image or selection, where 0.1 <= gamma <= 5.0. For RGB images, this function is applied to all three color channels. For 16-bit images, the minimum and maximum are used for scaling instead of 255.

Log

Applies the function f(p) = log(p) * 255/log(255) to each pixel (p) in the image or selection. For RGB images, this function is applied to all three color channels. For 16-bit images, the minimum and maximum are used for scaling instead of 255.

Binary Logic

The Binary Logic Filter contains commands that perform bitwise operations or shift bits accordingly within a pixel.

  1. Select the image object (or part of it with a Marquee or Lasso tool) or place it in Edit mode.
  2. Choose Image | Filter | Scientific | Binary Logic.
  3. In the Binary Logic Filter dialog box, select the Operation drop-down menu to choose a command.
  4. Enter a value in the Value numeric field.
  5. Select a format for your value from the Format drop-down menu.
  6. Click OK.

Enter a value

Operation

Explanation

Or

Performs a bitwise OR operation on a source pixel and an argument.

And

Performs a bitwise AND operation on a source pixel and an argument.

Xor

Performs a bitwise XOR operation on a source pixel and an argument.

Left Shift/Right Shift

Performs a logical shift; it shifts all the bits in the pixel left or right according to the value specified in edit box and inserts 0.

Image Math

This filter performs an arithmetic and logical operation between two color channels and applies the result to another color channel.

The Operation menu contains the following commands:

Operation

Explanation

Add

Adds a value to the image. With 8-bit images, results greater than 255 are set to 255.

Subtract

Subtracts a value from the image. With 8-bit and 16-bit images, results less than 0 are set to 0.

Multiply

Multiplies the image by the specified real value. With 8-bit images, results greater than 255 are set to 255. With 16-bit signed images, results greater than 65,535 are set to 65,535.

Divide

Divides the image by the specified real value. Attempts to divide by zero will be ignored.

Minimum

Pixels in the image with a value less than the specified value are replaced by the value.

Maximum

Pixels in the image with a value greater than the specified constant are replaced by the value.

Or

Performs a bitwise OR operation on a source pixel and an argument.

And

Performs a bitwise AND operation on a source pixel and an argument.

Xor

Performs a bitwise XOR operation on a source pixel and an argument.

Average

Applies the function Result = (img1+img2)/2 to each pixel in the image or selection.

Difference

Applies the function Result = |img1-img2| to each pixel in the image or selection.

The chosen operation is performed, and the result is multiplied by the Scale factor. The Offset value is then added. The final result is applied to the color channel selected from the Result menu.

Original image

1st operand: Green

Operation: Xor

2nd operand: Red

Scale: 2.0

Offset: 0.0

Result: Green

To Apply the Image Math Filter to Multiple Images:

  1. Select the images.
  2. Apply the filter by choosing Image | Filter | Scientific | Image Math.
  3. In the Filter operation mode dialog box, select the options you want to use.
  4. Click OK.
    • Related Articles

    • Image Types and Filters

      Image Types and Filters Canvas X Draw supports 8-bit and 16-bit images. All image filters are available for 8-bit images. For Binary filters, the 8-bit image must be grayscale. (See Binary Filters.) Regarding 16-bit images, various image filters and ...
    • Image Types and Filters

      Image Types and Filters Canvas X Draw supports 8-bit, 16-bit, and floating point (32-bit) images. All image filters are available for 8-bit images. For Binary filters, the 8-bit image must be grayscale. (See Binary Filters.) Regarding 16-bit and ...
    • Creating Custom Image Filters

      Creating Custom Image Filters You can create your own special-effect and image-correcting filters using the Custom command. You can also save custom filters and use them in future Canvas X Draw documents. Filters work with an image one pixel at a ...
    • Creating Custom Image Filters

      Creating Custom Image Filters You can create your own special effect and image-correcting filters using the Custom command. You can also save custom filters and use them in future Canvas X Draw documents. Filters work with an image one pixel at a ...
    • Creating Custom Image Filters

      Creating Custom Image Filters You can create your own special effect and image-correcting filters using the Custom command. You can also save custom filters and use them in future Canvas X Draw documents. Filters work with an image one pixel at a ...