【问题标题】:Imaging Processing - Clustering Cells into groups in Fly Embryos Images成像处理 - 在苍蝇胚胎图像中将细胞聚类成组
【发布时间】:2016-11-11 08:00:41
【问题描述】:

我希望有人可以帮助我解决图像处理问题。我的苍蝇胚胎被染色以寻找周围神经系统 (PNS) 中的细胞核 - 附件 1。这些细胞核在苍蝇的每个胚胎节段中形成簇。我的目标是使用这些细胞核簇来标记每个胚胎片段(即每个片段一个斑点或一个点) - 附件 2。

PNS Stain

PNS Stain showing blobs

我通过对标记的核进行高斯模糊(使每个核簇形成一个斑点)然后使用自适应阈值来识别这些“斑点”,取得了一些成功。然而,这不是一个非常稳健的方法——一些集群没有形成或多个集群粘在一起。我正在使用 scikit-image 进行分析,这是我一直在使用的代码的相关部分:

EmbryoBlur = gaussian(Embryo, sigma=(10,5))

ClusteredCells= threshold_adaptive(EmbryoBlur , block_size=151, method="mean")

是否有人有任何其他策略可以建议,以便它在每个原子核簇中稳健地形成一个点或斑点?

即使有人想从概念上解释一个策略,我也可以尝试在 scikit-image 中实现。

谢谢!

【问题讨论】:

    标签: image-processing scikit-image


    【解决方案1】:

    对于高斯混合模型http://www.ics.uci.edu/~smyth/courses/cs274/notes/EMnotes.pdf

    ,这看起来可以通过期望最大化 (EM) 解决

    另一种相关方法是 K-Means 聚类(在上面的链接中简要介绍),这两种方法都通过降低聚类内的方差来对数据进行聚类。对于 K-means,这通常使用距离度量来完成,而 EM 使用概率进行聚类。

    这两种方法的唯一缺点是,在对数据进行分割之前,您必须知道有多少个集群。不幸的是,我对 Scikit 一无所知,但希望这会给您一些想法来研究

    【讨论】:

      【解决方案2】:

      我不知道这是否正是您正在寻找的,但我拼凑了一个执行高斯模糊的脚本,然后使用随机游走分割(类似于分水岭)来填充和分割背景中的细胞核和细胞矩阵。

      您可以使用这些值来增加或减少模糊度 (sigma) 以及分割的底部和顶部阈值。

      我在 PNS Stain 图像上对其进行了测试,但我不得不裁剪白色边框。

      import numpy as np
      import matplotlib.pyplot as plt
      
      from skimage.io import imread
      from skimage.segmentation import random_walker
      from skimage.color import rgb2grey
      from scipy.ndimage.filters import gaussian_filter
      
      
      #change this to your personal image directory
      image = imread(r'C:\Users\YOURNAMEHERE\Desktop\mge1v.png') 
      grey_image = rgb2grey(image)
      
      blurred = gaussian_filter(grey_image, sigma=6) #play with sigma for blur amount
      
      
      #Get markers for random walk
      def get_markers(grey_array, bottom_thresh, top_thresh):
      
          markers = np.zeros_like(grey_array)
          markers[grey_array < bottom_thresh] = 1
          markers[grey_array > top_thresh] = 2
      
          return markers
      
      
      #perform Random Walker, fills in positive regions
      #play with .1 and .15 to set the thresholds for the labels
      segmentation = random_walker(blurred, get_markers(blurred, .1, .125), beta=130, mode='bf')
      
      
      #Plot images
      fig, axes = plt.subplots(2, 2, figsize=(12, 11))
      
      ax0, ax1,  ax2, ax3 = axes.ravel()
      
      ax0.imshow(image, cmap=plt.cm.gray, interpolation='nearest')
      ax0.set_title("Original")
      
      ax1.imshow(grey_image, cmap=plt.cm.gray, interpolation='nearest')
      ax1.set_title("Grey")
      
      ax2.imshow(blurred, cmap=plt.cm.gray)
      ax2.set_title("Gaussian Blur")
      
      ax3.imshow(segmentation, cmap=plt.cm.gray)
      ax3.set_title("Random Walk Segmented")
      
      for ax in axes.ravel():
          ax.axis('off')
      
      fig.subplots_adjust(left=None, bottom=None, right=None, top=None, wspace=None, hspace=None)
      
      
      plt.show()
      

      输出:

      【讨论】:

        猜你喜欢
        • 2015-03-20
        • 2018-01-13
        • 2022-08-11
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2019-09-23
        • 1970-01-01
        相关资源
        最近更新 更多