搜索
写经验 领红包

分割细度(什么叫细分)

导语:细分分割及检测

细胞分割:基于颜色的分割

方法:

import numpy as npimport matplotlib.pyplot as pltfrom skimage import datafrom skimage.color import rgb2hed, hed2rgb Separate the stains from the IHC imageihc_hed = rgb2hed(ihc_rgb) Displayfig, axes = plt.subplots(2, 2, figsize=(7, 6), sharex=True, sharey=True)ax = axes.ravel()ax[0].imshow(ihc_rgb)ax[0].set_title(&34;)ax[1].imshow(ihc_h)ax[1].set_title(&34;)ax[2].imshow(ihc_e)ax[2].set_title(&34;)  34;DAB&39;off& Rescale hematoxylin and DAB channels and give them a fluorescence lookh = rescale_intensity(ihc_hed[:, :, 0], out_range=(0, 1),                      in_range=(0, np.percentile(ihc_hed[:, :, 0], 99)))d = rescale_intensity(ihc_hed[:, :, 2], out_range=(0, 1),                      in_range=(0, np.percentile(ihc_hed[:, :, 2], 99))) respectivelyzdh = np.dstack((null, d, h))fig = plt.figure()axis = plt.subplot(1, 1, 1, sharex=ax[0], sharey=ax[0])axis.imshow(zdh)axis.set_title(&39;)axis.axis(&39;)plt.show()

细胞分割:阈值分割
import matplotlib.pyplot as pltimport numpy as npfrom scipy import ndimage as ndifrom skimage import (    color, feature, filters, measure, morphology, segmentation, util)from skimage.data import human_mitosisimage = human_mitosis()fig, ax = plt.subplots()ax.imshow(image, cmap=&39;)ax.set_title(&39;)plt.show()

本文内容由快快网络小信整理编辑!