ImageTank Reference Manual
Print

Binary Threshold

A mask variable is essentially a field of zeros and ones. This object creates a mask based on if a value at for a specific channel is above or below a given threshold.

This is in some ways similar to the thresholded path, just less accurate. The figure below compares these two approaches to find a shape. The blue points on the right are a visualization of where the mask has the value one. The points are semi-transparent so you can see the intensity field below.

The black line is the iso-contour for the given value. The position of the points on this path are interpolated based on the values at the intensity around the point. This means that you get a better approximation of the shape. If you look at the expression you see that what we are trying to approximate is where the norm of (x,y) is equal to 0.6, which is a circle with radius 0.6.

The mask is therefore much less accurate than the polygon, but it has a few benefits. One is that it is easier to use the mask in a cell by cell calculation since the mask is defined at the same grid points. The polygon uses a completely different data representation.

Another benefit of the mask is that it is easy to compute morphological operations such as erosion and dilations.

When the resolution increases the visual difference between the pixel approach and the polygonal approach is less visible. Use the side panel to hone in on details to pick the proper threshold value.

One slightly confusing thing you might run into is the slider pop-up for the threshold. When you have the side panel visible the range for the slider is based on the data in the side panel. In fact it is the coloring range in the histogram, since the assumption is that yo are focusing in on a detail and have adjusted the range to highlight the structure.

When you click on the slider button when the side panel is closed you will get this error message

The reason for that is that when the variable is closed ImageTank does not know what the intensity range is. Computing the intensity means computing the current value of the image and that might require a long computation. Instead ImageTank wants you to make really explicit that you want to compute the value. One way to do that without using the side panel is to click the Suggest button. This wil compute the value in a secondary thread and when it finishes the value will be inserted into the range field. Once there the slider will use this range.

On This Page