Functions > Image Processing > About Image Processing Functions
  
About Image Processing Functions
Use the image processing built-in functions for transforming, manipulating, and analyzing images. With image transformation and manipulation, you can enhance the appearance of an image. For example, you can make an image clearer and sharper by removing distortions and using filters. You can perform image analysis for determining the levels of color or intensity components in an image.
You can store digitized images in many formats, but all formats contain a matrix of numbers representing the gray level or color of each pixel in the image. PTC Mathcad stores images in ordinary matrices, with the position (row, column) in the matrix corresponding to the pixel position of the image, and the value in that position corresponding to the gray or color level of the image. You can use any matrix operation and numerics for analyzing and transforming images stored in matrix form.
The eight-bit scale for levels of gray that is used in many bitmap images ranges from 0 to 255; that is, using eight bits, there are 28 = 256 possible intensity levels. For example, a grayscale image of a white square in a black square is represented as follows:
Color bitmap images work on the same principle, but there are three matrices contained within the packed image matrix. The first corresponds to the values of the reds in the picture, the second to the greens, and the third to the blues. The following packed matrix represents the same white square in a black border out of colors:
Additional Information
The RGB packed image matrix represents an image in 24-bit color. Each pixel requires a full 24 bits of information to record all the color information (red, green, and blue). If your screen is only displaying 8-bit color (a total of 256 colors) or 16-bit color (about 65 thousand colors), the monitor averages the exact 24-bit colors to a palette of 256. You may need to set your display driver for optimal image viewing. We recommend that you set your display to at least 256 colors.
Large matrices require a lot of RAM storage space. If you have the minimum amount of RAM required, we recommend that you increase the swap space size (consult your User's Guide for Microsoft Windows) to 12 MB - 20 MB. A larger swap space and/or available RAM allow you to process larger images, view multiple images at one time, and perform more extensive processing operations. Where possible, avoid storing the results of intermediate image-processing calculations in separate matrices. Every matrix you create adds to the storage space required.
Many built-in functions can handle grayscale and color images with values besides 8-bit integers, including arbitrarily large, floating point, and negative numbers. These are converted to 8-bit integers for display and may not be able to be written out as image files.
Additional Information
Image processing functions that require the specification of a row or column index are affected by the value of ORIGIN.