python-opencv裁剪tif遥感影像
最近在做关于遥感影像变化检测的作业,影像太大了,首先需要对遥感影像进行裁剪。nnnimport cv2 as cvnnsrc=cv.imread(‘before.tif’)nnprint(src.shape)nncropImg = src[600:1100,600:1100] ncv.imwrite(“./be.tif”,cropImg) nnprint(cropImg.shape)nn输出:nn…
最近在做关于遥感影像变化检测的作业,影像太大了,首先需要对遥感影像进行裁剪。nnnimport cv2 as cvnnsrc=cv.imread(‘before.tif’)nnprint(src.shape)nncropImg = src[600:1100,600:1100] ncv.imwrite(“./be.tif”,cropImg) nnprint(cropImg.shape)nn输出:nn…