Navigation : Home : FoveaPro : FoveaPro Tutorial : Part 16

Image Analysis Cookbook 6.0:  Part 16



5.C. Combining multiple images of the same area to select features

5.C.1. Boolean logic to apply multiple criteria

Several of the preceding sections have made incidental use of Boolean combinations of images. For different color channels, or images thresholded and processed differently, Boolean logic can combine the information and isolate the structures of interest. The Boolean functions are AND, OR, Exclusive-OR and NOT (equivalent to inverting an image so that black becomes white, and vice versa), which can be combined in many ways. The examples shown illustrate a few of the ways that these operations can be combined. Note that the IP•Math–>General Boolean plug-in treats white (background) pixels as “off” and any non-white value as “on.”

image-463.png image-464.png image-465.png image-466.png image-467.png

Image A Image B A AND B A OR B A Ex-OR B

image-468.png image-469.png image-470.png image-471.png image-472.png

A AND (NOT B) NOT (A AND B) (NOT A) AND B (NOT A) OR B NOT (A OR B)

A typical use for these operations is to combine images thresholded from different color channels to select specific regions. The example shows the similar combination of different elemental maps from SEM X-ray images. The thresholded images were cleaned with a morphological closing using a coefficient of 6.

image-473.png image-474.png

Original Mica_Al image Thresholded for high Al content

image-295.png image-475.png

Original Mica_Si image Thresholded for high Si content

image-476.png

Silicon AND (NOT Aluminum)

Boolean operations are also useful when the same original image has been processed in multiple ways to isolate different types of information, which are then combined. In the example, two structures (the organelles and the gold particles) are isolated separately, but only those gold particles that lie on organelles are of interest, and are selected with a Boolean AND.

image-345.png image-347.png

Original Gold2 image Grey scale opening removes gold particles image-348.png image-477.png

Original divided by background isolates gold particles, which are then thresholded

image-478.png image-479.png

Thresholded organelles AND selects gold particles on organelles

The Boolean AND operation is frequently used to combine various types of grids with thresholded binary images as a precursor to measurement. Many of the stereological techniques in Section 6.B use grids as a way to obtain concise and meaningful information about structure. But the use of grids is even more general than that. In the example shown, a vertical section through a coating is prepared for measurement. The most straightforward and efficient way to perform this measurement is to create a grid of vertical lines ( IP•Lines and Points–>Parallel Lines–>Vertical ) with an spacing appropriate to the desired density of measurements, AND it with the coating image, and measure the length of the lines.

image-480.png image-481.png

Original Coating image Thresholded layer cross-section

image-482.png image-483.png

Vertical line grid ANDed with layer

droppedImage.pict

Measurement results

As an illustration of the various Boolean operations used in combination, and the way they can be used in conjunction with other binary processes, the multi-step example below addresses a situation in which the watershed segmentation method does not work: features that are hollow and irregular (non-convex) in shape. The image was thresholded to show the sheaths around nerve fibers. The goal is to separate them for individual measurement. One step (F) in the procedure uses a Feature-based AND rather than the Pixel-based AND used in the other examples. The IP•Math–>Select Features by 2nd routine is discussed below. The selection of the feature-crossing lines in step F can also be accomplished by measurement, keeping the longer lines.

This sequence may at first appear to be long and complex, but these Boolean operations are very fast and the entire process is easily automated using an Action. Understanding this sequence is a good test for having an understanding of Boolean operations that lie at the heart of many binary image processing sequences.

image-484.png image-485.png

A-Original Separate image B-Holes filled

image-486.png droppedImage.pict

C-Watershed D-Lines (B Ex-OR C)

image-488.png droppedImage.pict

E- Holes (A Ex-OR B) F- Lines in D selected by features in E

image-490.png image-491.png

G- Breaks restored (C OR F) H- Features separated (G AND A)