Created
July 18, 2019 18:00
-
-
Save elijahzarlin/0bb68eff12aadf894a591099287f4aae to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let current_data = [...];//An h * w array from current step of radar image | |
let next_data = [...];//An h * w array from next step of radar image | |
let new_data = []; | |
for (let i = 0; i < h; i++) { | |
for (let j = 0; j < w; j++) { | |
new_data[i * w + j] = parseInt((current_data[i * w + j] + next_data[i * w + j]) / 2); | |
} | |
} | |
let polygons = contours() | |
.size([w, h]) | |
.thresholds(smoothValues) | |
(new_data); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment