Remote Sensing |
||||
![]() |
|
777777100000077777777000000007777777000005576777777000005576 777777000004017777777000034755777777100033471777777710033457 777777713433457777777103400017714444434457777104555722557777 004557510007777045575100001777455751000000177 |
This is a latent (not visible) image and can be viewed by a system which transforms the numerical values into gray shades and assembles them in a two dimensional surface (TV screen, or, paper print).
If we assemble manually those values in 15 columns, then the following result occurs:
777777100000077
777777000000007
777777000005576
777777000005576
777777000004017
777777000034755
777777100033471
777777710033457
777777713433457
777777103400017
714444434457777
104555722557777
004557510007777
045575100001777
455751000000177
If we substitute the numerical values (gray codes) with gray scale values (gray shades) according to the transformation table:

then the following image is displayed:

The following image is displayed by making the pixel size smaller:

Assuming that this image is the portrait of an average man in a profile form, then one may observe that the nose is formed by one pixel. Assuming that the width of the nose of an average man is 25 mm then we may say that "this image has a spatial or ground resolution of 25 mm.
The same result can be accomplished by writing a computer program to read the image file "LAB9.DAT", and assemble the image on the screen or in a line printer. Such a viewing system is given below in a form of BASIC computer program running under MS-DOS:
10 REM Basic concepts of digital image and digital image processing
20 REM image: coding, decoding, viewing, negative
30 REM Prepared by: professor John N. Hatzopoulos
40 DIM N(15),P$(8)
60 P$(1)=CHR$(219):P$(2)=CHR$(178):P$(3)=CHR$(177):P$(4)=CHR$(176) Gray scale
70 P$(5)=CHR$(206):P$(6)=CHR$(186):P$(7)=CHR$(179):P$(8)=" " codes
72 R$="123456789012345":S$=R$' put initial values in R$, S$
80 OPEN "LAB9.DAT" FOR INPUT AS #1' open the file with the 15x15 gray scale codes
85 PRINT:PRINT:PRINT:PRINT TAB(10) "POSITIVE PICTURE" TAB(40) "NEGATIVE PICTURE":PRINT
90 FOR I=1 TO 4
100 LINE INPUT #1,Q$
110 L=0 'Initialize by zero the counter (offset) of the image file line
120 IF I<4 THEN J1=4 ELSE J1=3' The fourth image file line has three image rows
130 FOR J=1 TO J1
140 FOR K=1 TO 15
150 L=L+1
160 Q1$=MID$(Q$,L,1)' Pick up pixel value from a string of values
170 N(K)=VAL(Q1$)' convert alphanumeric value to numerical value
180 NEXT K
190 FOR K=1 TO 15
200 M=N(K)+1:A=8-N(K)' M positive image, A negative image
210 MID$(R$,K,1)=P$(M)' select gray scale value for positive image
212 MID$(S$,K,1)=P$(A)' select gray scale value for negative image
220 NEXT K
230 PRINT TAB(10) R$ TAB(40) S$' Draw an image line of gray scale values
240 NEXT J
250 NEXT I
260 CLOSE #1
270 PRINT:PRINT:PRINT "This is the end of the program"
This BASIC program does also processing of the image into negative and prints both the positive and the negative image. The algorithm which transforms the positive image into negative is given as follows:
f(x) = 7 f(x)
Where: f(x) is the pixel value of the positive, f(x) is the pixel value of the negative and 7 is the maximum gray scale value of the dynamic range.
The computer program matches the numerical values with the gray shades as follows:

As an exercise, run this programm under MS-DOS using either GWBASIC or QUICK BASIC. Make sure that an ASCII file named "LAB9.DAT" with numerical gray scale values, of exactly the same order as shown above, exists in the current directory.
© 1999 TRIANET, Program of the European
Union Socrates-Comenius
Last update on 05.05.1999 by Markus
Zapke-Gründemann