1nearblack(1)                General Commands Manual               nearblack(1)
2
3
4

NAME

6       nearblack - .TH "nearblack" 1 "Fri Apr 22 2011" "GDAL"
7

NAME

9       nearblack - convert nearly black/white borders to black
10

SYNOPSIS

12       nearblack [-white] [-near dist] [-nb non_black_pixels]
13                 [-o outfile] infile
14

DESCRIPTION

16       This utility will scan an image and try to set all pixels that are
17       nearly black (or nearly white) around the collar to exactly black (or
18       white). This is often used to 'fix up' lossy compressed airphotos so
19       that color pixels can be treated as transparent when mosaicing.
20
21       -o outfile:
22           The name of the output file to be created. Newly created files are
23           currently always created with the HFA driver (Erdas Imagine - .img)
24
25       -white:
26           Search for nearly white (255) pixels instead of nearly black
27           pixels.
28
29       -near dist:
30           Select how far from black (or white) the pixel values can be and
31           still considered near black (white). Defaults to 15.
32
33       -nb non_black_pixels:
34           number of non-black pixels that can be encountered before the
35           giving up search inwards. Defaults to 2.
36
37       infile:
38           The input file. Any GDAL supported format, any number of bands,
39           normally 8bit Byte bands.
40
41       The algorithm processes the image one scanline at a time. A scan 'in'
42       is done from either end setting pixels to black (white) until at least
43       'non_black_pixels' pixels that are more than 'dist' gray levels away
44       from black (white) have been encountered at which point the scan stops.
45       The nearly black (white) pixels are set to black (white). The algorithm
46       also scans from top to bottom and from bottom to top to identify
47       indentations in the top or bottom.
48
49       The processing is all done in 8bit (Bytes).
50
51       If the output file is omitted, the processed results will be written
52       back to the input file - which must support update.
53

AUTHORS

55       Frank Warmerdam <warmerdam@pobox.com>
56
57
58
59GDAL                            Fri Apr 22 2011                   nearblack(1)
Impressum