python+opencv提取细胞特征
提取细胞特征 持续更新ing…… import os,time import cv2 import numpy as np import matplotlib.pyplot as plt import copy def get_fit_img(img): dst = cv2.fastNlMeansDenoising(img,None,15,7,21) return dst def get_mean(temp, long_=10): temp_1 = [] for m in range(0+long_, 255-long_): temp_1.append(temp[m-long_:m+long_].mean()) temp_2 = np.array(temp_1) temp_out = np.zeros(255) temp_out[0+long_: 255-long_] = temp_2 return temp_out def grien_value(temp): temp_1 = np.zeros(255) temp_1[1:255] = temp[0:254] temp_out = temp - temp_1 temp_out = get_mean(temp_out, 10) return temp_out def get_last2value(temp): sign1 = 0