Help for BLEMVORB
Removes blemishs, wrinkles and warts from image space Viking Orbiter images.
EXECUTION:
blemvorb input-file output-file 'HALF AREA=(i1,i2,i3,i4)
OPERATION:
If no user parameters are specified, the label is scanned and the
camera serial number is retrieved,the blemishes are retrieved, and
the portion of the input image specified in SIZE is copied into the
output file. Additional blemishes can be removed from input image
using the removal option below.
Removal option:
Form:
AREA=(sl1,sb1,nl1,nb1,sl2,sb2,nl2,nb2,...,slk,sbk,nlk,nbk)
where
slk = starting line of rectangle k
sbk = starting byte of rectangle k
nlk = number lines in rectangle k
nbk = number of bytes in rectangle k
Function:
These parameters cause the rectangular areas specified to be removed
from the picture and to be replaced with an average of nearby points.
Specifically, let R be the rectangle located between lines L1 and L2
and samples S1 and S2 and assume R is to be eliminated. Let M be the
line coordinate of a point within R, and let N be its coordinate. Let
X(A,B) be the data number of a point located at line A, sample B.
Then: X(M,S1) X(M,S2) X(L1,N) X(L2,N)
------- + ------- + ------ + -------
(N-S1) (S2-N) (M-L1) (L2-M)
X(M,N) = ---------------------------------------
1 1 1 1
------- + ------- + ------ + -------
(N-S1) (S2-N) (M-L1) (L2-M)
In other words, if (E,F) is within a rectangle to be eliminated,
PL PR PT PB
-- + -- + -- + --
DL DR DT DB
X(E,F) = ---------------------
1 1 1 1
-- + -- + -- + --
DL DR DT DB
where PL, PR, PT, and PB are the intensities of the nearest points
to the left, right, top, and bottom outside the rectangle and DL, DR,
DT, and DB are the distances to those points. If a rectangle to be
eliminated occurs at the edge of a picture, only those terms in the
above equations for which intensities exist in the input are used.
Thus, if the rectangle to be removed occurs in the lower left hand
corner of a picture, the terms dealing with L2 and S2 in the first
equation and those dealing with DL and DB in the DL and DB in the
second equation are not used.
RESTRICTIONS:
The input image be be in raw, image space. It must not have had its
geometry changed in any way since being read off the EDR.
EXAMPLES:
blemvorb A B
This operation copies the picture in file A to file B and removes
the blemishes
blemvorb SIZE=(1,1,300,300) AREA=(1,1,25,25,101,51,25,30) inp=A out=B
This operation copies the top left 300 x 300 square of the picture
in file A into file B removing the 2 rectangles specified by the
AREA parameter.
blemvorb SIZE=(75,99,300,400) 'HALF AREA=(100,200,10,5) inp=A out=B
Given a halfword (16 bits per pixel) picture 400 lines by 500
samples (1000 bytes). The output picture will contain the 300
lines and 200 samples staring at line 75 and sample 50 and the
10 line by 5 sample block starting at line 100 and sample 200
(in the input picture) is to be averaged out.
HISTORY:
Written BY: Joel Mosher
Cognizant Programmer: None
Revision: new 29-MAR-1986 renamed from SAR to BLEMVORB
1 10-JUL-1991 modified to call new VOLABV2
2 01-JUL-1994 Made portable for UNIX AS (CRI)
3 07-MAR-1995 Fixed tst pdf as per FR 85747
PARAMETERS:
INP
Viking Orbiter image
OUT
output image
SIZE
4 integers sl,ss,nl,ns
SL
integer starting line
SS
integer starting sample
NL
integer number of lines
NS
integer number of samples.
HALF
keyword halfword input format
BYTE
keyword byte input format
AREA
integer, multiples of 4
sl,ss,nl,ns locations of blemishes
CAMERA
integer VO camera serial number
SN
integer VO camera serial number
See Examples:
Cognizant Programmer: