Advertisement
Guest User

Untitled

a guest
Sep 20th, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. import cv2
  2. import numpy as np
  3. from osgeo import gdal
  4.  
  5. img = cv2.imread("image.png", flags=-1)
  6. # modify the image
  7. cv2.imwrite("output.png", img)
  8. ds = gdal.Open("output.png")
  9. # do stuff with GDAL
  10.  
  11. import cv2
  12. import numpy as np
  13. from osgeo import gdal
  14.  
  15. img = cv2.imread("image.png", flags=-1)
  16. # modify the image
  17. ds = gdal.datasetFromArray(img)
  18. # do stuff with GDAL
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement