Image Mask Quickstart
The Image Mask GUI application processes coin images for publication. The program automatically finds the edges of the coin, masks out the background to your choice of color. This version of Image Mask is used for interactive processing of images. The command line version provides the same functionality in a scriptable form.
Installation instructions for Image Mask.
ExamplesExample 1 - Load A Source Image
Example Source Images
Example 1 - Load A Source Image
Use the menu selection File -> Open. The Open dialog is displayed. Navigate to the directory with your source image. Select the source image and click the Save button.
Your source image will be opened in the Original tab. The result image will be displayed in the Final tab. If you haven't made any changes to the Options (on the left side of the window) the Final image is a small version of the original.
Example 2 - Resize Image To Fit Tab (Or to Full Size)
When a new image is loaded it is displayed at its full size. If the image is larger than the display area you will see only the top left part of the image. This will prabably be only a small part of the background. Press the Fit button to resize the image to fit entirely in the window.
When scaled to Fit the image is displayed at a low resolution. To see the original, higher resolution press the Full button. Drag the scroll bars to move the hidden parts of the image into view.
Example 3 - Automatically Find A Round Coin
There are several ways to find (or specify) the edge of the coin. The easiest is usually the Find Circle option. This tool will search for multiple points around the edge of the coin, then calculate a circle that passes through each of those points. Of course this only works on round coins. The Find Irregular option is used for coins that are not round (perhaps square or oval).
When using the Find Circle option there are several parameters to improve the identification of points around the edge of the coin.
Example 4 - Automatically Find A Non-Round Coin
The edge of a coin that is not round can be found automatically. The application finds a bunch of points along the edge of the coin and joins them by a straight line. If a small number of points is used a course outline results that cuts off corners. Increase the number of points to get a better result.
When using the Find Irregular option there are several parameters to improve the identification of points around the edge of the coin.
Example 5 - Handle Renegade Points
Often points are erroneously detected far from the edge of the coin. These points can be filted out before the edge of the coin is calculated. There are two filters available. The first is very simple. It ignores any point that is too far from its neighbors. This works pretty well as long as none of the erroneous points are next to each other.
If there are small clusters of erroneous points use the Point Run filter type. You can specify a number of points that must be in a cluster (or run of points). Smaller runs of points will not be included in the calculated edge.
Example 6 - Crop, Mask Out Background, Change Background Color
Click on the Final tab to see the output image. If you haven't change any options yet the image will look the same as the original image.
To crop the edges of the images to the edge of the coin select "Crop To Coin" from the Image Process - Cropping listbox.
To mask out the background select "yes" from the Image Process - Mask listbox.
To change the color of the background change the color name in the Output - Background text box. If an invalid color name is entered the text will be red. When a valid color is entered the text turns black the background color changes. The color name can be any recognized english color name or a hex value.
Hex color values are written with a hash then the value. For example:
Example 7 - Rotate Coin
In the Image Process - Rotate option enter the degrees to rotate the coin. Positive values rotate the coin clockwise, negitive values rotate counter clockwise. The example here rotates a coin by 90 degrees. Usually, this is used to adjust a coin that was photographed just slightly rotated to make it appear completely level.
Example 8 - Draw A Grid Over The Output Image
Select "yes" on the Output Decoration - Grid option to display the grid. The grid is drawn in blue. At this time the color of the grid can not be changed.
The number of grid columns is changed by setting the value in the Output Decoration - Grid Width option.
The number of grid rows is changed by setting the value in the Output Decoration - Grid Height option.
Example 9 - Draw An Arrow To Highlight A Feature
To draw a white arrow on the output image select "yes" on the Output Decoration - Highlight Arrow listbos.
Set the location to which the arrow points in the fields labeled Point To X and Point To Y. Valid values are from 0.0 (left or top sides) to 1.0 (right or bottom sides).
Set the direction in which the arrow points by selecting a value from the Direction listbox.
Example 10 - Create Grayscale Output Image
Select "8 bit Grayscale" on the Output - Output Type listbox.
Set the black point and white point by changing the values in Black Point and White Point. Values range from 0.0 (Black) to 100.0 (White).
Example 11 - Change The Size Of The Output Image
The size of the output image is controlled by the size of the actual coin and the resolution. The output resolution is in Dots Per Inch (DPI). For example, to create an output image of 900 x 900 pixels:
Example 12 - Save The Final Image
Use the menu selection File -> Save. If this is the first time you've saved your final image the Open dialog is displayed. Navigate to the directory where you want to save your Final Image. Enter the name of your Final Image and click the Save button.
Your Final Image will be saved in the selected file.