Create Pixel Mask
The Create Pixel Mask command creates a pixel mask, which is a list containing the (column,row) coordinates of pixels. The pixel mask is used by the Apply Pixel Mask method to repair defective points at the mask coordinates. To create the pixel mask, defects are identified in a source image by testing for pixel values greater than and/or less than specified values. The identified pixels are saved to a pixel mask file which is then loaded by the Apply Pixel Mask command. You can also edit this pixel mask file (or any pixel mask file) using the Edit Pixel Mask command.
Open the Create Pixel Mask from theProcess > Calibration menu.
Properties of the Create Pixel Mask Command |
|
Source Image |
The image containing errant pixels that will be detected for creating the pixel mask. |
Greater than |
Identify errant pixels greater than the specified value. |
Less than |
Identify errant pixels less than the specified value. |
Include Pixel Values in the Mask File |
When creating the mask file, include the values of the detected pixels. If not checked, the pixel mask contains only the (column,row) coordinates of the detected pixels. |
Use Cursor ROI |
Identify pixels only inside the image cursor ROI. |
A pixel mask contains (x,y) pairs of pixels. The purpose of this command is to automatically identify pixels having extreme values and save them into a pixel mask file. Later, that pixel mask file may be edited to remove or correct coordinates or to add coordinates that were not identified by the present command. This command creates the pixel mask from a source image, which must be chosen from one of the displayed images. To identify pixels for inclusion, their values either must be very high or very low compared with "normal" values occurring in the source image. You can use this command to identify values that are high, low, or both, and may be anywhere in the image or within a rectangular region of interest.
To use this technique to create a pixel mask, you need a source image containing high or low pixels that are defective. Usually a dark frame or a flat field frame is used for this purpose, since the dark frame shows hot pixels well above the normal distribution of values and a high-signal flat field frame reveals "cold" pixels far below the normal distribution of values. The threshold values can be determined before opening this dialog or afterwards by inspection of the source image. This dialog does not take command of the screen, so you can determine the threshold values while the dialog is open by roaming the cursor over the image or by doing image statistics or other analyses.
The result of this command is a collection of pixel coordinates saved as a Pixel Mask File of type pxm. The pixel mask is saved in the folder of the source image, using the same file name, with"_PixelMask.pxm" appended to the image name. A summary of results is listed in the Message Pane.
After running this command, you can view and edit the pixel mask file using the Edit Pixel Mask command. The pixel mask is separately applied to other images using the Apply Pixel Mask command.
NOTE |
This command uses the Processing Image Set Flag on the Image Toolbar to determine the number of pixel masks to create when the target Image Window contains an Image Set. If the flag is set to process all images, then a pixel mask is created for each image in the image set. If set to process 1 image, a pixel mask is created only for the current image. |
Select a dark frame in the Image field and check theGreater than option. This will identify pixels that are greater in value, or "hotter", than the threshold value. Enter a threshold value that is below the values of the hot pixels but is above the values of the "good" pixels in the dark frame.
Select a bright flat field frame in the Image field and check theLess than option. Enter a threshold value that is above the values of the cold or dead pixels but below the values of the typical "good" pixels.
The results of Create Pixel Mask are listed in the Message Pane as shown below. The command was run on an Image Set of 5 images, hence 5 pixel masks were created.
The pixel mask created from the 5th image of the image set was opened in Notepad as shown below:
Repairing Artifacts and Cosmetic Defects, Apply Pixel Mask, Edit Pixel Mask, Edit Blemish Mask, Clean Image Set