Object shape measurements
Prerequisites
Before starting this lesson, you should be familiar with:
Learning Objectives
After completing this lesson, learners should be able to:
Understand shape measurements and their limitations
Perform shape measurements on objects.
Motivation
Our eyes are extremely good in distinguishing forms and this has proven to be a powerful tool for characterizing different cell-types, functions, phenotypes, etc. In image processing we use shape measurements (e.g. area, volume, elongation, …) for an automated and objective characterization of forms. From the shape features we can address scientific questions or filter objects that should be used for further processing. Typically we apply shape measurements on a labeled image. The labeled image, as obtained after a connected component analysis, defines a set of objects in 2D/3D.
Concept map
shape features"| ex["area (volume)
perimeter (surface)
circularity = 4 Pi A/P^2"] sa --> table("Results table") table --> object_rows["Rows are objects"] table --> feature_columns["Columns are shape features"]
Example figure
Activity
Open an image and perform shape measurements. Explain simple shape features (area, volume, perimeter) and some more complexes like circularity, elongation. Show that results can also be represented as an image.
Show activity for:ImageJ GUI
- Open image xy_8bit_labels__four_objects.tif
- Perform shape measurements and discuss their meanings [Plugins > MorphoLibJ > Analyze > Analyze Regions]
- Discuss using white board some shape features (see also MorphoLibJ Documentation). For example:
- Area
- Perimeter
- Circularity = 4 Pi Area/Perimeter^2
- Convexity = Object perimeter/convex-hull perimeter
- Ellipse fit
- Explore results visualisation [Plugins > MorphoLibJ > Label Images > Assign Measure to Label]
- Add a calibration to the image and check which shape measurements are affected.
- Perform a shape analysis for 3D image xyz_16bit_labels__spindle_spots.tif
- Draw a square (=circle) of different size 2x2 pixels (paper, whiteboard, …)
- Measure area, perimeter and circularity
- Discuss the results
- To show effect of small sized objects use xy_8bit_labels__circles_different_size.tif
diameter-circle (px) Area (theory) Perimeter (theory) Area (MLJ) Perimeter (MLJ) 1 0.78 3.141 1 2.68 3 7.06 9.42 5 8.04 5 19.63 15.70 21 15.62 11 95.03 34.55 97 33.94 51 2042.82 160.22 2053 161.19
- Discuss the England’s coastline paradox Wiki
- Show measurements of objects in 3D. Open image xyz_16bit_labels__spindle_spots.tif and [Plugins > MorphoLibJ > Analyze > Analyze Regions]
Exercises
Show exercises for:ImageJ GUI
Open image xy_16bit_labels__nuclei.tif Using MorpholibJ:
- Measure object shapes and find the label index of the nucleus with the largest perimeter
- Change the pixel size to 0.5 um and repeat the measurements. Why do some parameters change while others don’t?
- (Optional) Create an image where each object is coloured according to the measured circularity
Solution
- [Plugins > MorphoLibJ > Analyze > Analyze Regions] the upper right nuclei.
- Some features are the ratio of dimensional features and so are independent of the spatial calibration.
- [Plugins > MorphoLibJ > Label Regions > Assign Measure to Label].
Assessment
True or false? Discuss with your neighbour
- Circularity is independent of image calibration.
- Area is independent of image calibration.
- Perimeter can strongly depend on spatial sampling.
- Volume can strongly depend on spatial sampling.
- Drawing test images to check how certain shape parameters behave is a good idea.
Solution
- Circularity is independent of image calibration True
- Area is independent of image calibration. False
- Perimeter can strongly depend on spatial sampling. True
- Volume can strongly depend on spatial sampling. True
- Drawing test images to check how certain shape parameters behave is a good idea. True
Follow-up material
We recommend reading these modules next:
Learn more:
Segmentation Annotator. Label mask and measurements exploration and annotation in ImageJ
Wikipedia coastal line paradox. Effect of Sampling and resolution on the measurements
Results visualisation. Label visualization in 3D viewer