TIFF with only a channel and values
Posted: 2012-12-10T03:03:48-07:00
Hi,
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:
But when I check it with gdalinfo it says it's three bands:
And identify -verbose says:
However, if I try doing this in GIMP, split it in components in layers, delete all layers except Red channel, I get a TIFF only with a band.
gdalinfo says:
identify -verbose says:
Then, I try with convert and -type palette and gdalinfo says:
Well. But ¿I could get other values for each pixel? For example:
Thank you very much.
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
[...]