Upload
nathaniel-obrien
View
216
Download
0
Tags:
Embed Size (px)
Citation preview
Computational Biology, Part 22Biological Imaging II
Computational Biology, Part 22Biological Imaging II
Robert F. MurphyRobert F. Murphy
Copyright Copyright 1996, 1999, 2000. 1996, 1999, 2000.
All rights reserved.All rights reserved.
Image DisplayImage Display
Operations that change display without Operations that change display without changing imagechanging image LUT - grayscale or colorLUT - grayscale or color Contrast stretchingContrast stretching
Operations that change imageOperations that change image reversiblereversible non-reversible (majority)non-reversible (majority)
Image DisplayImage Display
Image DisplayImage Display
Image DisplayImage Display
Image DisplayImage Display
Note that image is identical to original (LUT change is reversible)
Image DisplayImage Display
Image DisplayImage Display After enhancement uses full range
Original (before contrast enhancement)
ThresholdingThresholding
Thresholding refers to the division of the Thresholding refers to the division of the pixels of an image into two classes: those pixels of an image into two classes: those below a certain value (the below a certain value (the thresholdthreshold) and ) and those at or above it. The two classes are those at or above it. The two classes are often shown in white and black, often shown in white and black, respectively.respectively.
Thresholding serves as a means to consider Thresholding serves as a means to consider only a only a subsetsubset of the pixels of an images. of the pixels of an images.
ThresholdingThresholding
The choice of threshold must be made The choice of threshold must be made empirically by considering the nature of the empirically by considering the nature of the sample, the type and number of objects sample, the type and number of objects expected in the image, and/or a histogram expected in the image, and/or a histogram of pixel valuesof pixel values
The threshold can be specified as a multiple The threshold can be specified as a multiple of the background value (normally the most of the background value (normally the most common value) for partial automationcommon value) for partial automation
ThresholdingThresholdingWhite on black images need to be inverted before some of NIH Image’s operations work as desired
ThresholdingThresholding
ThresholdingThresholding
Once a threshold has been applied, the Once a threshold has been applied, the resulting image may beresulting image may be displayeddisplayed in black and white in black and white displayeddisplayed with above threshold pixels at their with above threshold pixels at their
original intensities and below threshold pixels original intensities and below threshold pixels in blackin black
ThresholdingThresholding
Once a threshold has been applied, the Once a threshold has been applied, the resulting image may beresulting image may be savedsaved as a new image with only pixels above as a new image with only pixels above
threshold being retained (others set to 0)threshold being retained (others set to 0) savedsaved as or as or convertedconverted to a binary image (above to a binary image (above
threshold pixels set to 1, below threshold pixels threshold pixels set to 1, below threshold pixels set to 0)set to 0)
Binary image operationsBinary image operations
ErosionErosion Remove pixels from edges of objectsRemove pixels from edges of objects Set “on” pixel to “off” if four or more of its Set “on” pixel to “off” if four or more of its
eight neighbors are whiteeight neighbors are white DilationDilation
Add pixels to edges of objectsAdd pixels to edges of objects Set “off” pixel to “on” if four or more of its Set “off” pixel to “on” if four or more of its
neighbors are blackneighbors are black
Binary image operationsBinary image operations
“Make Binary” is necessary before Binary operations can be used
Binary image operationsBinary image operations
Binary image operationsBinary image operations
Binary image operationsBinary image operationsThis image shows just the pixels that were turned off by the erode operation
Binary image operationsBinary image operations
OpenOpen Smooth objects and fill in small holesSmooth objects and fill in small holes Erosion followed by dilationErosion followed by dilation
CloseClose Smooth objects and fill in small holesSmooth objects and fill in small holes Dilation followed by erosionDilation followed by erosion
Binary image operationsBinary image operations
OutlineOutline Find “on” pixel, trace around outside until Find “on” pixel, trace around outside until
return to first “on” pixelreturn to first “on” pixel SkeletonizeSkeletonize
Remove pixels from the edges of objects until Remove pixels from the edges of objects until the objects are one pixel widethe objects are one pixel wide
Binary image operationsBinary image operations
Binary image operationsBinary image operations
Object finding (Particle analysis)Object finding (Particle analysis)
Principle: Identify a contiguous set of pixels Principle: Identify a contiguous set of pixels that are all above some thresholdthat are all above some threshold
Implementation:Implementation: Start with a binary (thresholded) imageStart with a binary (thresholded) image Find a pixel that is “on” and start a list or mapFind a pixel that is “on” and start a list or map Recursively search all nearest neighbors for Recursively search all nearest neighbors for
additional pixels that are on and add them to the additional pixels that are on and add them to the list or maplist or map
Object finding (Particle analysis)Object finding (Particle analysis)
Remember to start with a thresholded image converted to binary!
Object finding (Particle analysis)Object finding (Particle analysis)
Object finding (Particle analysis)Object finding (Particle analysis)
Object finding (Particle analysis)Object finding (Particle analysis)
Object finding (Particle analysis)Object finding (Particle analysis)
Export... gives the same result as Save As...
Object finding (Particle analysis)Object finding (Particle analysis)
Results file can be opened within Simpletext (use fixed width font!) or read by Excel (e.g., for plotting)
Object finding (Particle analysis)Object finding (Particle analysis)
Uses:Uses: Counting objectsCounting objects Obtaining area measurements for objectsObtaining area measurements for objects Obtaining integrated intensityObtaining integrated intensity Isolating objects for other processingIsolating objects for other processing