Keywords: front-page

# Framing an Image with Rulers

[Laboratory]

Image composing and editing is often required for creation of presentations and synthetic images. Starting with an image we may be required to produce new images.

Below, we have the original image of a ruler used to count pixels in the width direction.

In this experiment we want to frame this image with this ruler.

How can this be done?

One way to accomplish this is to begin by creating four rulers.

1. bottom ruler:

   it is the original ruler but with the same width of the image.

2. top ruler: extract the numbers of the ruler (last 7 pixels of the bottom ruler)

   and the tics of the ruler (top 7 pixels of the bottom ruler)

   flip the tics so that they face down

   finally inset the tics below the numbers

3. left ruler: swap the axes (width by the height) of the bottom ruler and flip it:

   a); b)
   a) | b)

4. right ruler: repeat the same procedure but using the top ruler instead of the bottom ruler.

Then inset the four rulers on the proper positions of the original image.

- Lab: Framing an Image with Rulers