planetlabs / plcompositor

seamless and cloudless image mosaics from deep stacks of satellite imagery
http://planet.com
Apache License 2.0
101 stars 21 forks source link

Added reddest quality to compositor #13

Closed joferkington closed 8 years ago

joferkington commented 8 years ago

This PR adds a "reddest" quality to the compositor in addition to the current "greenest".

In some cases, it would be useful to be able to compose scenes based on "redness" as opposed to only darkness or greenness.

Cloud shadows tend to shift things towards blue, as well as darken the pixels. Therefore, a reddest metric will help reduce both clouds and cloud shadows. Furthermore, preferring redder pixels will help harvested or tilled fields come through preferentially, which can be useful for seasonal mosaics.

One caveat - I've only added a simple test to small_tests.py. In the long run, it would probably be useful to add a new reddest golden image to saojose_l8_chip.zip and update saojose_tests.py.

pl-nfwarmerdam commented 8 years ago

I believe reddest can be accomplished with the "darkest" class, and applying a band_1_weight of 1.0 and band_2_weight and band_3_weight as 0.0. See the https://github.com/planetlabs/plcompositor/blob/master/tests/small_tests.py#L571 example.

So I suggest we discard this PR though it looks like you did an excellent job.

joferkington commented 8 years ago

Good point! Thanks a bunch!