Insert annotation into an image at specified locations.
Inserts horizontal or vertical text annotations into an image. The user may specify up to twenty text strings of 264 characters or less and their line/sample locations. The size of the characters, the grey value for the characters, and the grey value for the background may also be specified. Annotation may be placed on an existing image, the input image may be copied and then annotations applied, or a new image with annotations may be created.
- IN
- Input image. Image that the annotation is to be placed on. Subbanding is allowed but windowing is not.
- ANNOTE
- Annotation text. Text string(s) to be inserted into the image. The maximum string length is 264 characters. Each text string will consist of two consecutive parameter values concatenated together. (The string is split in two because the maximum TAE string length is 132.) See User Note 2.
- SL
- Starting line. The starting line within the image where the corresponding text string will start. There must be one value for each string specified in ANNOTE. SL and SS together specify the location of the top left corner of the annotation text.
- SS
- Starting sample. The starting sample within the corresponding image line where the corresponding text string will start. There must be one value for each string specified in ANNOTE. SL and SS together specify the location of the top left corner of the annotation text.
- FONT
- Size of the font.
= FONT1: 8 x 10 (cellwide x cellhigh) = FONT2: 13 x 24 = FONT3: 22 x 40 = FONT4: 26 x 48 = FONT5: 32 x 58
- SCALFACT(--)
- Annotation scale factor. The scale factor that determines the character cell size for the annotation text.
- ANOTDIR(HOR HOR HOR HOR HOR HOR HOR HOR HOR HOR HOR HOR HOR HOR HOR HOR HOR HOR HOR HOR)
- Annotation direction. The direction of the text strings on the image. There must be one direction for each of the annotation strings.
= HOR: Horizontal. The text strings will be inserted horizontally on the image. = VERT: Vertical. The text strings will be inserted vertically on the image.
- CHARGREY(--)
- Character grey value. The grey value for the characters in each annotation text. All characters for a given annotation will have the same grey value. The default grey value is 255.
- BACKGRND(--)
- Background grey value. The grey value for the background of the annotations. A small rectangular area slightly larger than each annotation string will form each background region. If defaulted, the background will be the original image.
- IN
- Input image. The image to be copied. Subbanding and windowing are allowed.
- OUT
- Output image. The output image will be the same size and data type as IN.
- ANNOTE
- Annotation text. Text string(s) to be inserted into the image. The maximum string length is 264 characters. Each text string will consist of two consecutive parameter values concatenated together. (The string is split in two because the maximum TAE string length is 132.) See User Note 2.
- SL
- Starting line. The starting line within the image where the corresponding text string will start. There must be one value for each string specified in ANNOTE. SL and SS together specify the location of the top left corner of the annotation text.
- SS
- Starting sample. The starting sample within the corresponding image line where the corresponding text string will start. There must be one value for each string specified in ANNOTE. SL and SS together specify the location of the top left corner of the annotation text.
- FONT(FONT1)
- Size of the font.
= FONT1: 8 x 10 (cellwide x cellhigh) = FONT2: 13 x 24 = FONT3: 22 x 40 = FONT4: 26 x 48 = FONT5: 32 x 58
- SCALFACT(--)
- Annotation scale factor. The scale factor that determines the character cell size for the annotation text.
- ANOTDIR(HOR HOR HOR HOR HOR HOR HOR HOR HOR HOR HOR HOR HOR HOR HOR HOR HOR HOR HOR HOR)
- Annotation direction. The direction of the text strings on the image. There must be one direction for each of the annotation strings.
= HOR: Horizontal. The text strings will be inserted horizontally on the image. = VERT: Vertical. The text strings will be inserted vertically on the image.
- CHARGREY(--)
- Character grey value. The grey value for the characters in each annotation text. All characters for a given annotation will have the same grey value. The default grey value is 255.
- BACKGRND(--)
- Background grey value. The grey value for the background of the annotations. A small rectangular area slightly larger than each annotation string will form each background region. If defaulted, the background will be the original image.
- OUT
- Output image. The output image will be a single band BYTE image.
- ANNOTE
- Annotation text. Text string(s) to be inserted into the image. The maximum string length is 264 characters. Each text string will consist of two consecutive parameter values concatenated together. (The string is split in two because the maximum TAE string length is 132.) See User Note 2.
- SL
- Starting line. The starting line within the image where the corresponding text string will start. There must be one value for each string specified in ANNOTE. SL and SS together specify the location of the top left corner of the annotation text.
- SS
- Starting sample. The starting sample within the corresponding image line where the corresponding text string will start. There must be one value for each string specified in ANNOTE. SL and SS together specify the location of the top left corner of the annotation text.
- FONT(FONT1)
- Size of the font.
= FONT1: 8 x 10 (cellwide x cellhigh) = FONT2: 13 x 24 = FONT3: 22 x 40 = FONT4: 26 x 48 = FONT5: 32 x 58
- NL(512 )
- Number of lines. The number of lines in the output image.
- NS(512 )
- Number of samples. The number of samples per line in the output image.
- PIXVAL(1)
- Pixel value. The value to assign to each of the pixels in the generated image before it is annotated.
- SCALFACT(--)
- Annotation scale factor. The scale factor that determines the character cell size for the annotation text.
- ANOTDIR(HOR HOR HOR HOR HOR HOR HOR HOR HOR HOR HOR HOR HOR HOR HOR HOR HOR HOR HOR HOR)
- Annotation direction. The direction of the text strings on the image. There must be one direction for each of the annotation strings.
= HOR: Horizontal. The text strings will be inserted horizontally on the image. = VERT: Vertical. The text strings will be inserted vertically on the image.
- CHARGREY(--)
- Character grey value. The grey value for the characters in each annotation text. All characters for a given annotation will have the same grey value. The default grey value is 255.
- BACKGRND(--)
- Background grey value. The grey value for the background of the annotations. A small rectangular area slightly larger than each annotation string will form each background region. If defaulted, the background will be the original image.
All bands of image MYFILE are annotated. The first text string, "this is image", is located at line 1, sample 100, and is the normal size of the default FONT1. The second string, "number one", is located at line 13, sample 100, and is twice the normal size of FONT1 (double the size of the first string). Both text strings default to the horizontal direction with character grey value 255; the input image forms the background for the characters.
All bands of image MYFILE are copied to image MYCOPY which is then annotated. The first text string, "this is a copy", is located at line 150, sample 190, and uses the normal size of FONT2. The second string, "of myfile", is located at line 16, sample 230, and is also the normal size of FONT2. Both text strings have a character grey value of 0 and background grey value of 255. The first text string is positioned horizontally while the second is positioned vertically.
A single-band BYTE image, MYFILE, is generated with size 1500 lines by 2500 samples and brightness value 128. The first text string, "new test", is located at line 1, sample 1, and is two times the normal size of FONT3. The second string, "text number one", is located at line 1, sample 977, and is two times the normal size of FONT3. Both text strings have a character grey value of 200 and background value of 0. Both text strings are positioned vertically.
Font1's annotated character is represented by an 8 x 10 pixel cell. This cell includes a one pixel border on the right and bottom edges of each character as illustrated by the following figure for the character "A":
Y Axis Pixel X Axis Pixel ------------ --------------- 1 2 3 4 5 6 7 8 1 . . . X . . . . 2 . . X . X . . . 3 . X . . . X . . 4 X . . . . . X . 5 X X X X X X X . 6 X . . . . . X . 7 X . . . . . X . 8 X . . . . . X . 9 X . . . . . X . 10 . . . . . . . . Key: X foreground pixels . background pixelsFont2 through 5 annotated character is represented by a font with either a 13x24, 22x40, 26x48 or 32x58 array of points.
The font uses the last four columns as character separation. Also, the last 13 lines are used for characters that extend below the horizontal line such as letters "j", "p","q", etc. An example using FONT3 (22 wide x 40 high) for the letter "A" is:
1 1 1 1 1 1 1 1 1 1 2 2 2 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 1 . . . . . . . X X X X . . . . . . . . . . . 2 . . . . . . . X X X X . . . . . . . . . . . 3 . . . . . . X X X X X X . . . . . . . . . . 4 . . . . . . X X X X X X . . . . . . . . . . 5 . . . . . . X X X X X X . . . . . . . . . . 6 . . . . . X X X X X X X X . . . . . . . . . 7 . . . . . X X X . . X X X . . . . . . . . . 8 . . . . . X X X . . X X X . . . . . . . . . 9 . . . . X X X X . . X X X X . . . . . . . . 10 . . . . X X X . . . . X X X . . . . . . . . 11 . . . . X X X . . . . X X X . . . . . . . . 12 . . . . X X X . . . . X X X . . . . . . . . 13 . . . X X X X . . . . X X X X . . . . . . . 14 . . . X X X . . . . . . X X X . . . . . . . 15 . . . X X X . . . . . . X X X . . . . . . . 16 . . . X X X . . . . . . X X X . . . . . . . 17 . . X X X X . . . . . . X X X X . . . . . . 18 . . X X X X X X X X X X X X X X . . . . . . 19 . . X X X X X X X X X X X X X X . . . . . . 20 . . X X X X X X X X X X X X X X . . . . . . 21 . X X X X . . . . . . . . X X X X . . . . . 22 . X X X . . . . . . . . . . X X X . . . . . 23 . X X X . . . . . . . . . . X X X . . . . . 24 . X X X . . . . . . . . . . X X X . . . . . 25 X X X X . . . . . . . . . . X X X X . . . . 26 X X X . . . . . . . . . . . . X X X . . . . 27 X X X . . . . . . . . . . . . X X X . . . . 28 . . . . . . . . . . . . . . . . . . . . . . 29 . . . . . . . . . . . . . . . . . . . . . . 30 . . . . . . . . . . . . . . . . . . . . . . 31 . . . . . . . . . . . . . . . . . . . . . . 32 . . . . . . . . . . . . . . . . . . . . . . 33 . . . . . . . . . . . . . . . . . . . . . . 34 . . . . . . . . . . . . . . . . . . . . . . 35 . . . . . . . . . . . . . . . . . . . . . . 36 . . . . . . . . . . . . . . . . . . . . . . 37 . . . . . . . . . . . . . . . . . . . . . . 38 . . . . . . . . . . . . . . . . . . . . . . 39 . . . . . . . . . . . . . . . . . . . . . . 40 . . . . . . . . . . . . . . . . . . . . . . Key: X foreground pixels . background pixelsThe input parameter of SCALFACT will allow all 5 fonts to be scaled.
Note that there is no border around the top and left edges of the annotated text. If the image background and the character pixel values are similar, then the left and top edges of the annotated text may blend into the image. This artifact is illustrated with an example image that appears in the online html (Mosaic) help and the hardcopy user guide. Also illustrated is the appearance of text using a dark image for background.
If the background grey value (BACKGRND) is defaulted, the foreground character data overwrites the input pixels. If any other value is selected for BACKGRND, the entire character cell is overwritten with foreground and background pixels. The user may vary the size of the characters. If the annotation text does not fit within the bounds of the image a fatal error results.
ANNOTATE supports the following characters:
SP ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~The single back quote (`) and tab characters are not supported and will cause a fatal error.
An error occurred allocating memory. Rerun ANNOTATE, and if the error recurs, contact the system manager.
ANNOTATE does not allow for single back quote (`) and tab characters in the annotation text. The specified character was encountered.
A fatal error was encountered. The message displayed preceding this message was the error encountered. Processing terminates.
The number of values for the named parameter must not be less than the number of text strings.
The input images must be the same size. Respecify the windows and rerun.
If any portion of a text string extends beyond the image, this message indicates which of the text strings is in error. Also identified is whether the text extends beyond the image's bottom or beyond the right edge.
ANNOTATE-INPLACE does not allow for window specifications. The user should execute ANNOTATE-INOUT instead.
SCALFACT Character Cell Size -------- ------------------- Samples Lines ------- ----- 1 13 24 2 26 48 3 39 72 4 52 96 5 65 120 6 78 144 7 91 168 8 104 192 ... 64 832 1536
1) ANNOTE=("first text", "second text") 2) ANNOTE=("first text",, "second text") 3) ANNOTE=("first text", "", "second text")
The first example defines one text string: "first textsecond text". The second and third examples define two text strings of which the first one is "first text" and the second one is "second text".