Skip to content

MtS-WH data set: color correction when extracting training set #3

@Y-F-Yang

Description

@Y-F-Yang

Hello,

In the MtS-WH data set, it seems that for images in training set, all the channels are corrected to 8-bit unsigned color, while for those in test set, the B-G-R channels are 11-bit and NIR channel is 16-bit. So I tried a naïve way to cast 11-bit color to 8-bit, i.e., 8-bit = 11-bit * 256 / 2048. However this does not work out well.

Here's an example:
First I load a training data file 'l2_n10_x95_y780.tif' into numpy nd-array (only B-G-R). It looks like:

[[[ 40,  23, 136],
    [ 43,  26, 143],
    [ 38,  22, 127],
    ...,
    [ 43,  26, 139],
    [ 48,  33, 152],
    [ 44,  27, 139]],

   [[ 41,  25, 140],
    [ 43,  26, 143],
    [ 45,  30, 143],
    ...,
    [ 46,  30, 147],
    [ 40,  23, 131],
    [ 48,  33, 152]], ...

Then I read the corresponding part in 'hanyang2002' into numpy array, using indices [780:780+150, 95:95+150, 0:3] (hopefully I'm correct), which looks like:

[[[330, 349, 211],
    [330, 349, 211],
    [326, 341, 200],
    ...,
    [338, 360, 226],
    [339, 363, 229],
    [335, 356, 220]],

   [[329, 346, 216],
    [330, 347, 217],
    [329, 345, 215],
    ...,
    [334, 356, 230],
    [338, 364, 241],
    [331, 351, 222]], ...

Finally by performing 8-bit = 11-bit * 256 / 2048, the test data becomes

[[[41, 44, 26],
    [41, 44, 26],
    [41, 43, 25],
    ...,
    [42, 45, 28],
    [42, 45, 29],
    [42, 44, 28]],

   [[41, 43, 27],
    [41, 43, 27],
    [41, 43, 27],
    ...,
    [42, 44, 29],
    [42, 46, 30],
    [41, 44, 28]], ...

which obviously does not coincide with training data.

So is there any special color or maybe radiometric correction performed when extracting training set?

Thanks very much!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions