摘要:
import os import sys import glob from osgeo import gdal import numpy as np import cv2 def CalHistogram(img): img_dtype = img.dtype img_hist = img.resh
閱讀全文
posted @ 2022-11-21 19:28
行走的蓑衣客
閱讀(229)
推薦(0)
摘要:
import time import pyperclip """ 安裝pyperclip pip install pyperclip """ #此代碼可復(fù)制pdf中內(nèi)容,并自動(dòng)刪除換行符和空格 def is_Qnumber(uchar): """判斷一個(gè)unicode是否是全角數(shù)字""" if uc
閱讀全文
posted @ 2022-11-21 19:25
行走的蓑衣客
閱讀(215)
推薦(0)
摘要:
""" 將16位遙感圖像壓縮至8位,并保持色彩一致 """ from osgeo import gdal import os import glob import numpy as np import matplotlib.pyplot as plt # plt 用于顯示圖片 import matp
閱讀全文
posted @ 2022-11-21 19:22
行走的蓑衣客
閱讀(354)
推薦(0)
摘要:
在ArcGIS 10.2以上版本,漢字經(jīng)常亂碼,解決方法:做一個(gè)擴(kuò)展名為.reg,內(nèi)容如下: Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\ESRI\Desktop10.7\Common\CodePage] "dbf
閱讀全文
posted @ 2022-08-13 15:29
行走的蓑衣客
閱讀(349)
推薦(0)
摘要:
輸入的區(qū)域可以是柵格的或者是矢量的,值數(shù)據(jù)只能是柵格的 import numpy as np import pandas as pd def zonal_statistic(zonal_arr, data_arr, stats_field=['mean'], nodata=255): """ Par
閱讀全文
posted @ 2022-07-23 15:11
行走的蓑衣客
閱讀(211)
推薦(0)
摘要:
from skimage import measure import cv2 import numpy as np ## ##image:二值圖像 ##threshold_point:符合面積條件大小的閾值 def remove_small_points(image,threshold_point)
閱讀全文
posted @ 2022-05-17 20:59
行走的蓑衣客
閱讀(470)
推薦(0)
摘要:
#Python計(jì)算矩陣8鄰域之和 Neighbors = [(1, 1), (1, -1), (1, 0), (-1, 0), (-1, 1), (-1, -1), (0, 1), (0, -1)] def get_neighbors_sum(array_of_arrays, row, col):
閱讀全文
posted @ 2022-05-17 20:58
行走的蓑衣客
閱讀(928)
推薦(0)
摘要:
1.去除NoData import cv2 import gdal import scipy.interpolate import numpy as np def read_img(filename): dataset=gdal.Open(filename) im_width = dataset.R
閱讀全文
posted @ 2022-05-17 20:27
行走的蓑衣客
閱讀(554)
推薦(0)
摘要:
from osgeo import gdal from osgeo import osr import numpy as np def getSRSPair(dataset): ''' 獲得給定數(shù)據(jù)的投影參考系和地理參考系 :param dataset: GDAL地理數(shù)據(jù) :return: 投影參考
閱讀全文
posted @ 2022-04-10 12:53
行走的蓑衣客
閱讀(798)
推薦(0)
摘要:
#open3d安裝:pip3 install open3d-python import open3d as o3d import numpy as np def makePlyFile(xyzs, labels, fileName='makeply.ply'): '''Make a ply file
閱讀全文
posted @ 2022-03-17 22:15
行走的蓑衣客
閱讀(722)
推薦(0)