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 floating point (32-bit) images, various image filters and adjustment commands are available. (See Available filters and adjustment commands.)
If you are working with various image types and need to determine or convert images, choose Image | Mode.
You must convert an 8-bit or 16-bit image to grayscale to enable the FP-32 Bits/Channel option.
The following table indicates the filters that can be used with each type:
Image type | |
16-bit | Average blur, Gaussian blur, Add Noise, Despeckle, Dust & Scratches, Median, High Pass, Maximum, Minimum, Arithmetic, Binary Logic, Expression, Image Math, Colorize, Invert, Levels, Curves, Brightness/Contrast, Convolve, Hue/Saturation (RGB only), Color Balance (RGB only) |
FP (32-bit) | Average blur, Median, Minimum, Maximum, Arithmetic, Expression, Image Math, Convolve, Colorize |
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.
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 |
The Erode command reduces the size of objects that are darker than the background.
Original image | Image with Erode filter applied |
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.
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 |
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 |
Select this command and all black objects will be represented by a one-pixel wide outline.
Original image | Image with Outline filter applied |
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 |
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 |
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 |
Canvas X Draw features scientific filters that can be used to analyze 8-bit, 16-bit, and floating point (32-bit) images. See Available filters and adjustment commands to verify which scientific filter is available for the various image types.
Choose Image | Filter | Scientific.
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.
Select the Preview checkbox so you can see the result before clicking OK.
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. |
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. |
The Binary Logic Filter contains commands that perform bitwise operations or shift bits accordingly within a pixel.
The Operation menu contains the following commands:
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. |
The Colorize filter is used to assign colors or gradients to a chosen range of values. Depending on the image type, 8-bit, 16-bit, or floating point (32-bit), you can use either absolute values or percentages.
For floating point (32-bit) images, the Absolute values checkbox is automatically selected so you will use Absolute values.
New filter | Click on this icon to start a new filter. The default values are 0 to 100. |
Value range | Enter the minimum and maximum in the scroll boxes. Deselect the Absolute values checkbox to use percentages for the range. Select it for actual values (floating point 32 images). |
Color palette | Assign a color to the value range. Select the Gradient option to access both color palettes and view the distribution of the minimum/maximum range. |
Edit box | All defined filters are stored in this area. |
Preview | Select the Preview checkbox if you want to see the results before clicking OK. |
You can save an unlimited number of settings.
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 |
The Math Expression filter can be used to perform mathematical equations on a color channel.
The lower portion of the dialog box indicates the correct syntax and shows an example of the expression.
The Convolve filter can be used to apply a spatial convolution on an image or selected image area. The convolution is performed according to a kernel, which is basically a matrix whose size you define in terms of width and height in pixels. Note that only odd numbers can be used to define the size of the kernel. The maximum is 11 pixels and the minimum, 3 pixels.
The Convolve filter is applied to every pixel in an image. The center of the matrix matches the source pixel and the other matrix components relate to the surrounding pixels.
The resulting pixel is calculated by multiplying the value of each source pixel by the corresponding value in the kernel and then adding the results.
Saved kernels appear at the bottom of the menu when you click the menu icon.
Before pasting a kernel, ensure there is a space between the values.
Original image | Image with Convolve filter applied |