Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sentinel2 magic eyes #346

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions sentinel-2/sentinel-2.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ Dedicated to supplying data for [Copernicus services](https://www.esa.int/Our_Ac
- [Total Ozone Column over Antarctica snow](/sentinel-2/ozone_column_over_snow)
- [BRDF normalisation](/sentinel-2/brdf)
- [Simple Panchromatic](/sentinel-2/simple_panchromatic) - Create a simple greyscale visualization by averaging the 10m true color and NIR bands
- [Magic Eyes](/sentinel-2/magic_eyes) - A composite optimized for visual interpretation of land cover

#### Scripts including machine learning techniques (eo-learn)

Expand Down
4 changes: 2 additions & 2 deletions sentinel-2/simple_panchromatic/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ scripts:
- script_mosaics.js
examples:
- zoom: '14'
lat: '42.76703'
lng: '36.823'
lat: '-1.29954'
lng: '36.85158'
datasetId: S2L2A
fromTime: '2025-03-03T00:00:00.000Z'
toTime: '2025-03-03T23:59:59.999Z'
Expand Down
4 changes: 2 additions & 2 deletions sentinel-2/simple_panchromatic/script_mosaics.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

function setup() {
return {
input: ["B01", "B02", "B03", "B08", "dataMask"],
input: ["B02", "B03", "B04", "B08", "dataMask"],
output: { bands: 4 }
};
}
Expand All @@ -14,7 +14,7 @@ function setup() {

function evaluatePixel(sample) {
// Calculate the mean of the bands
let pan = (sample.B01 + sample.B02 + sample.B03 + sample.B08) / 4;
let pan = (sample.B02 + sample.B03 + sample.B04 + sample.B08) / 4;

return [gain * pan, gain * pan, gain * pan, sample.dataMask];
}