This file contains hidden or 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
| <!DOCTYPE HTML> | |
| <html lang="en"> | |
| <head> | |
| <title>Record WebGL to WebM (Chrome only)</title> | |
| <meta charset="utf-8"> | |
| <link rel="stylesheet" href="styles.css" charset="utf-8"> | |
| </head> | |
| <body> | |
| <div class="buttons"> |
This file contains hidden or 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
| #!/usr/bin/env python | |
| import numpy as np | |
| import cv2 | |
| from sys import argv | |
| # Gaussian radius (should really be an argument): | |
| r = 21 | |
| src, dst = argv[1:] |
This file contains hidden or 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
| #!/usr/bin/env python | |
| # Very simple rasterio NDVI (or general normalized difference ratio) demo. | |
| # python ndvi.py $landsat_scene/*B{4,5}.TIF ndvi.tif | |
| import rasterio as rio | |
| from sys import argv | |
| import numpy as np | |
| math_type = np.float32 # type for internal calculations |
This file contains hidden or 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
| #!/usr/bin/env python | |
| # ndvi.py red.tif nir.tif output-ndvi.tif | |
| # Calculate NDVI (see Wikipedia). Assumes atmospheric correction. | |
| # (Although I use it without all the time for quick experiments.) | |
| import numpy as np | |
| from sys import argv | |
| from osgeo import gdal, gdalconst |
This file contains hidden or 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
| import math | |
| import Image | |
| import Levenshtein | |
| class BWImageCompare(object): | |
| """Compares two images (b/w).""" | |
| _pixel = 255 |