Transposing and Rotating an Image

A transpose exchanges row and column positions. A right-angle rotation can combine an exchange with a reversal under typical array coordinates.

Source
Anbloq
Language
English
Created
Updated
Chapters
2
Reading time
1 min
In this article2 chapters
  1. Trace a nonsquare grid
  2. Check the rotation sign

Trace a nonsquare grid

A two-row, three-column image becomes three rows by two columns after transpose. Original row zero, column one becomes row one, column zero. Row-major offsets can identify the source sample.

Check the rotation sign

A clockwise rotation of that source maps original row zero, column zero to new row zero, column one. Use lettered corners in a test fixture to distinguish transpose from rotation.[1][2]

References

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