3. Basic Methods II: Image operations

3.5. Geometric Operations - Mirroring

The mirroring of an image is a simple operation that switches the position of pixels in an image on the left/right or top/bottom part, also called "flop" and "flip", respectively. Flopping reverses the X-axis, whereas flipping reverses consequently the Y-axis. Both operations together produce an image that is the same as the original image that has been rotated by 180°. 

This circumstance is of particular interest for astronomers since some telescopic systems (like a simple Newton telescope) produce such a reversed image. Applying a flip and flop to the observed image reverses the image to its real format. The usage of a zenith mirror in front of the ocular or CCD sensor on the telescope just mirrors the image in one axis, which is easily corrected after.

Operation: Flip

Fig. 3.4: Y-axis mirror or flip.

Operation: Flop

Fig. 3.5: X-axis mirror or flop.

Operation: FlipFlop

Fig. 3.6: X-axis and Y-axis mirror.


One has to take into account that the simple reversal of coordinates will place the new image outside of the old image. If the image needs, for example, to be mirrored along the Y-axis, the new image also needs to be translated by the height of the image:

\( x' = x \)

\( y' = y_{max} - y \)

Since the operations only deal with integer coordinates and the boundaries of the new image (usually) equal the boundaries of the old image no interpolation is necessary.