I'm looking for get a file in TIFF format and only with a channel. Red channel for example, single band, because I'll need for georeference and get pixel values.
Firstly I've replaced the colours by anothers. For example one colour to rgb(12,12,12), another to rgb(18,18,18), rgb(24,24,24), rgb(30,30,30),... And secondly I try to get a TIFF single band with:
Code: Select all
convert prueba.tiff -channel R -separate prueba-R.tiff
Code: Select all
Band 1 Block=480x2 Type=UInt16, ColorInterp=Red
[...]
Band 2 Block=480x2 Type=UInt16, ColorInterp=Green
Band 3 Block=480x2 Type=UInt16, ColorInterp=Blue
Code: Select all
[...]
Channel statistics:
Red:
min: 3084 (0.0470588)
max: 65535 (1)
mean: 62746.7 (0.957453)
standard deviation: 12821.5 (0.195643)
kurtosis: 17.2132
skewness: -4.38243
Green:
min: 3084 (0.0470588)
max: 65535 (1)
mean: 62746.7 (0.957453)
standard deviation: 12821.5 (0.195643)
kurtosis: 17.2132
skewness: -4.38243
Blue:
min: 3084 (0.0470588)
max: 65535 (1)
mean: 62746.7 (0.957453)
standard deviation: 12821.5 (0.195643)
kurtosis: 17.2132
skewness: -4.38243
[...]
gdalinfo says:
Code: Select all
[...]
Band 1 Block=480x64 Type=Byte, ColorInterp=Gray
Code: Select all
[...]
Channel statistics:
Gray:
min: 12 (0.0470588)
max: 255 (1)
mean: 244.151 (0.957453)
standard deviation: 49.8889 (0.195643)
kurtosis: 17.2132
skewness: -4.38243
[...]
Code: Select all
[...]
Band 1 Block=480x34 Type=Byte, ColorInterp=Palette
Image Structure Metadata:
NBITS=4
Color Table (RGB with 16 entries)
0: 12,12,12,255
1: 18,18,18,255
2: 24,24,24,255
3: 30,30,30,255
4: 36,36,36,255
5: 42,42,42,255
6: 48,48,48,255
7: 255,255,255,255
8: 0,0,0,255
9: 0,0,0,255
10: 0,0,0,255
11: 0,0,0,255
12: 0,0,0,255
13: 0,0,0,255
14: 0,0,0,255
15: 0,0,0,255
Code: Select all
0: 255,255,255
12: 12,12,12,255
18: 18,18,18,255
24: 24,24,24,255
30: 30,30,30,255
36: 36,36,36,255
[...]