The Centroid of Selected Pixel Positions

An unweighted centroid averages row and column coordinates of selected samples. It can lie between pixels or outside a nonconvex shape.

Source
Anbloq
Language
English
Created
Updated
Chapters
2
Reading time
1 min
In this article2 chapters
  1. Trace two positions
  2. Choose the weights if applicable

Trace two positions

For positions \((1,1)\) and \((1,4)\), the centroid is \((1,2.5)\). It records mean location rather than one chosen selected pixel. See weighted and unweighted averages.

Choose the weights if applicable

An intensity-weighted centroid moves toward higher-valued positions. A bounding box center answers a different geometric question. See box extrema.[1][2]

References

  1. scikit-image Contributors, NumPy Images and Coordinate Conventions ↩
  2. scikit-image Contributors, Image Data Types and Representable Values ↩