Pixel Mask File


The Pixel Mask File is an ASCII text format file that contains coordinate pairs for pixel locations. The file is used by some methods such as CImage:ApplyPixelMask to correct point defects in images.

File Format

The mask file has a simple format like that shown below, consisting of (column,row) coordinate pairs and optional comments. Comments are prefixed by a # symbol and cause Mira to disregard everything from the # to the end of line. The file may contain any number of point coordinates and any number of comments. A sample file is shown below.

 

# coordinates are 1-based

# (another comment)

100, 230      # first pixel location

200, 404      # second point location

484, 677

 

This sample file begins with 2 comment lines, then lists 3 coordinates at (100,230), (200,404), and (484,677). Each coordinate is listed in the format

column, row

on 1 line, using a comma to separate the numbers. Each line contains 1 coordinate. The amount of white-space before, between, or after the column,row pairs is unimportant.

Creating a Pixel Mask File

A pixel mask file may be created by editing a simple text file using the format described above. Alternatively, Mira provides a Edit Pixel Mask command into which you can type the bad pixel information and save it to a file that the script could load. Finally, the Mira Create Pixel Mask method can create a pixel mask by locating pixels above or below threshold values.

Related Topics

CreatePixelMask, ApplyPixelMask, SetMaskedValue


Mira Pro x64 Script User's Guide, Copyright Ⓒ 2023 Mirametrics, Inc. All Rights Reserved.