Difference between revisions of "Segmentation"

(Add a brief walkthrough for segmentation workflows)
Line 8: Line 8:
  
 
More precisely, image segmentation is the process of ''assigning a label'' to every pixel in an image such that pixels with the same label share certain visual characteristics.
 
More precisely, image segmentation is the process of ''assigning a label'' to every pixel in an image such that pixels with the same label share certain visual characteristics.
 +
 +
= Easy workflow =
 +
 +
One option which is designed to be very powerful, yet easy to use for non-experts in image processing:
 +
 +
<font size="5">&lt; [[Advanced Weka Segmentation]] &gt;</font>
 +
 +
Give it a try—you might like it!
 +
 +
= Flexible workflow =
 +
 +
One good workflow for segmentation in ImageJ is as follows:
 +
 +
# Preprocess the image using filters, to make later thresholding more effective. Which filter(s) to use is highly dependent on your data, but some commonly useful filters include:
 +
#* [[:Category:Deconvolution|Deconvolution]]
 +
#* [http://imagej.net/docs/guide/146-29.html#sub:Subtract-Background... Subtract Background]
 +
#* [http://imagej.net/docs/guide/146-29.html#sub:Gaussian-Blur... Gaussian Blur]
 +
#* [http://imagej.net/docs/guide/146-29.html#sub:Find-Edges Find Edges]
 +
# Apply a [http://imagej.net/docs/guide/146-28.html#sub:Threshold...%5BT%5D Threshold].
 +
#* Ideally you want to use one of the auto-threshold methods, rather than manually tweaking, so that your result is reproducible later on the same data, and on multiple other datasets.
 +
# [http://imagej.net/docs/guide/146-29.html#infobox:InvertedLutMask Create a mask].
 +
# Manipulate the mask as needed; e.g.:
 +
#* [http://imagej.net/docs/guide/146-29.html#sub:Dilate Dilate] to grow the included pixels
 +
#* [http://imagej.net/docs/guide/146-29.html#sub:Erode Erode] to shrink the included pixels
 +
# [http://imagej.net/docs/guide/146-27.html#sub:Create-Selection Create a selection] from the mask.
 +
# [http://imagej.net/docs/guide/146-27.html#infobox:TransferSelections Transfer the selection] back to your original image with the original (non-processed) pixel data.
 +
#* If you ran filters on your data, you probably want to [http://imagej.net/docs/guide/146-26.html#sub:Revert%5Br%5D Revert] those changes first.
 +
# Do some numerical analysis on the selected data; e.g.:
 +
#* [http://imagej.net/docs/guide/146-30.html#sub:Measure...%5Bm%5D Measure] the entire selection directly.
 +
#** Control which measurements are done using [http://imagej.nih.gov/ij/docs/guide/146-30.html#sub:Set-Measurements... Set Measurements].
 +
#* Use [http://imagej.nih.gov/ij/docs/guide/146-30.html#sub:Analyze-Particles... Analyze Particles] to extract desirable objects from your selection and report individual statistics on them.
 +
#* Use the [http://imagej.net/docs/guide/146-30.html#fig:The-ROI-Manager ROI Manager] to '''Add''' the selection and then '''Split''' it (under the '''More''' button), then use '''Multi Measure''' (also under '''More''') to report statistics on the objects.
 +
#* [[Macros_Intro|Write a macro]] to automate this sort of analysis, loop over objects in the ROI manager, measure and manipulate them, etc.
  
 
= See also =
 
= See also =
  
 
For a list of Fiji plugins which perform image segmentation, see: [[:Category:Segmentation]].
 
For a list of Fiji plugins which perform image segmentation, see: [[:Category:Segmentation]].

Revision as of 12:01, 26 April 2013

Introduction

Image segmentation is "the process of partitioning a digital image into multiple segments." (Wikipedia)

Segmentation-overlay.jpg Segmentation-boundaries.jpg

It is typically used to locate objects and boundaries.

More precisely, image segmentation is the process of assigning a label to every pixel in an image such that pixels with the same label share certain visual characteristics.

Easy workflow

One option which is designed to be very powerful, yet easy to use for non-experts in image processing:

< Advanced Weka Segmentation >

Give it a try—you might like it!

Flexible workflow

One good workflow for segmentation in ImageJ is as follows:

  1. Preprocess the image using filters, to make later thresholding more effective. Which filter(s) to use is highly dependent on your data, but some commonly useful filters include:
  2. Apply a Threshold.
    • Ideally you want to use one of the auto-threshold methods, rather than manually tweaking, so that your result is reproducible later on the same data, and on multiple other datasets.
  3. Create a mask.
  4. Manipulate the mask as needed; e.g.:
    • Dilate to grow the included pixels
    • Erode to shrink the included pixels
  5. Create a selection from the mask.
  6. Transfer the selection back to your original image with the original (non-processed) pixel data.
    • If you ran filters on your data, you probably want to Revert those changes first.
  7. Do some numerical analysis on the selected data; e.g.:
    • Measure the entire selection directly.
    • Use Analyze Particles to extract desirable objects from your selection and report individual statistics on them.
    • Use the ROI Manager to Add the selection and then Split it (under the More button), then use Multi Measure (also under More) to report statistics on the objects.
    • Write a macro to automate this sort of analysis, loop over objects in the ROI manager, measure and manipulate them, etc.

See also

For a list of Fiji plugins which perform image segmentation, see: Category:Segmentation.