Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import cv2
- import numpy as np
- from osgeo import gdal
- img = cv2.imread("image.png", flags=-1)
- # modify the image
- cv2.imwrite("output.png", img)
- ds = gdal.Open("output.png")
- # do stuff with GDAL
- import cv2
- import numpy as np
- from osgeo import gdal
- img = cv2.imread("image.png", flags=-1)
- # modify the image
- ds = gdal.datasetFromArray(img)
- # do stuff with GDAL
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement