作为新手,我需要卸载cmder(命令行模拟器)。我已经广泛搜索以找到一种方法,但无济于事。有些人暗示一个人应该简单地删除所有文件,但如果这是正确的方法,那么如何确保所有文件都被完全删除?
例如,我之前尝试了这个,并且在我的系统上留下了几个无法删除的神秘文件。
非常感谢任何帮助。特别是,有没有其他人去卸载cmder?
提前致谢!
答案 0 :(得分:1)
根据说明here,您需要执行以下操作
import cv2
import numpy as np
#extract color histogram function
def extractColorHist(imageIn):
hist = []
zeropix = np.count_nonzero(np.all(imageIn == [0,0,0],axis=2))
for i in range(3):
series = cv2.calcHist([imageIn],[i],None,[256],[0,256])
series[0] = series[0] - zeropix
hist.append(np.ravel(series))
#lop off black and white
return np.concatenate(np.array(hist))
#read in an image
img_name = 'lena.jpg'
tmp = cv2.imread(img_name,cv2.IMREAD_COLOR)
image = cv2.resize(tmp,(300,300),interpolation=cv2.INTER_CUBIC)
#cropped image
cropped = image[:200,:200]
#save cropped image
cv2.imwrite('cropped.jpg',cropped)
#load cropped image
saved_img = cv2.imread('cropped.jpg',cv2.IMREAD_COLOR)
#get color histogram from both images
hist1 = extractColorHist(cropped)
hist2 = extractColorHist(saved_img)
#returns false
print(np.all(hist1 == hist2))
。完成!